package com.sg.service.biz.framework.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.annotations.BanAuto;
import com.sg.common.exception.Assert;
import com.sg.common.exception.BizException;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.common.util.RedisUtil;
import com.sg.dto.base.framework.req.*;
import com.sg.dto.base.framework.req.DeptDto;
import com.sg.dto.biz.component.common.DataFilterSpecRecByDto;
import com.sg.dto.biz.component.common.DataSetDuplicateRemovalDto;
import com.sg.dto.biz.component.common.DataSetsListOneDto;
import com.sg.dto.biz.component.common.DataSetsListTwoDto;
import com.sg.dto.biz.component.req.*;
import com.sg.dto.biz.component.res.*;
import com.sg.dto.biz.framework.common.DeptAdminAndDeputyDto;
import com.sg.dto.biz.framework.common.DeptListDto;
import com.sg.dto.biz.framework.common.DeptSourceDataDto;
import com.sg.dto.biz.framework.common.DockingPersonInfoDto;
import com.sg.dto.biz.framework.req.*;
import com.sg.dto.biz.framework.res.*;
import com.sg.dto.integration.component.QueryConfItemMatchAnswerDetailComReqDto;
import com.sg.dto.integration.component.QueryConfItemMatchAnswerDetailComRespDto;
import com.sg.entity.*;
import com.sg.service.base.framework.*;
import com.sg.service.biz.framework.*;
import com.sg.service.biz.framework.nb.NbBatch;
import com.sg.service.biz.framework.nb.NbOrg;
import com.wicket.okrcomponent.integration.ConfSchemeService;
import com.wicket.okrcomponent.integration.InterfaceModeService;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;


/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class OrgServiceImpl implements OrgService {

    @Resource
    private RedisUtil redisUtil;
    @Resource
    private MDeptService mDeptService;
    @Resource
    private MOrganizationService mOrganizationService;
    @Resource
    private MStaffingAccountService mStaffingAccountService;
    @Resource
    private NbOrg nbOrg;
    @Resource
    private MInductionRecordService mInductionRecordService;
    @Resource
    private MDutyTargetDetailService mDutyTargetDetailService;
    @Resource
    private MStaffingService mStaffingService;
    @Resource
    private MDeptPositionRelationshipService mDeptPositionRelationshipService;
    @Resource
    private MRoleMemberService mRoleMemberService;
    @Resource
    private MUserinfoService mUserinfoService;
    //@Resource
    //private MCustomFieldsService mCustomFieldsService;
    @Resource
    private ConfSchemeService confSchemeService;
    @Resource
    private MSpaceService mSpaceService;
    // @Resource
    // private MSpecMethordTableService mSpecMethordTableService;

    @Resource
    private NbBatch nbBatch;

    @Autowired
    ChangeColumnService changeColumnService;
    @Resource
    private MBatchService mBatchService;
    @Resource
    private MTypeDictionaryService mTypeDictionaryService;
    @Resource
    private MStatusCheckItemService mStatusCheckItemService;
    @Resource
    private MManagedDeptService mManagedDeptService;
    @Resource
    private PowerService powerService;
    @Resource
    private InterfaceModeService interfaceModeService;
    //@Resource
    //private undefinedService undefinedService;
    @Resource
    private MPersonSourceDataService mPersonSourceDataService;
    @Resource
    private MDepartSourceDataService mDepartSourceDataService;
    @Resource
    private InductionRecordService inductionRecordService;
    @Resource
    private MOriginalRoleMemberService mOriginalRoleMemberService;
    @Resource
    private MPrivacyDistributionService mPrivacyDistributionService;
    @Resource
    private MUsersService mUsersService;
    @Resource
    private MOriginalRoleMemberInfoService mOriginalRoleMemberInfoService;
    @Resource
    private MUsersUnionService mUsersUnionService;
    @Resource
    private RoleService roleService;
//@Resource
    //private MCustomFields2Service mCustomFields2Service;


    /**
     * D1-3查询部门树状结构列表	[1177]
     * gen by moon at 10/16/2022, 6:01:28 AM
     */
    @Trace(operationName = "D1-3查询部门树状结构列表	")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptTreeListRespDto queryDeptTreeList(QueryDeptTreeListReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//步骤0: 1-3-09查询部门列表 - queryDeptList
        List<Dept> listDept = new ArrayList<>();
        QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
        queryDeptListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:41107_1
        if (reqDto != null) {
            queryDeptListReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:41094_1
            queryDeptListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:237719_1
        }

        /*1-3-09查询部门列表[217]   */
        Assert.isNull(queryDeptListReq.getTypeDictionaryId(), "D1-3查询部门树状结构列表	-1-3-09查询部门列表-部门类型字典ID不能为空", false);
        Assert.isNull(queryDeptListReq.getOrganizationId(), "D1-3查询部门树状结构列表	-1-3-09查询部门列表-组织ID不能为空", false);
        Assert.isNull(queryDeptListReq.getSubjectLifeCycle(), "D1-3查询部门树状结构列表	-1-3-09查询部门列表-主体生命周期不能为空", false);
        listDept = mDeptService.queryDeptList(queryDeptListReq);


        listDept_1 = listDept;

        QueryDeptTreeListRespDto retData = new QueryDeptTreeListRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:380715_1


        return retData;
    }

    /**
     * D1-3新增部门[659]
     * gen by moon at 10/2/2022, 7:44:37 AM
     */
    @Trace(operationName = "D1-3新增部门")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @BanAuto
    @Override
    public AddDeptRespDto addDept(AddDeptReqDto reqDto) {


        String string_1 = null;
//virtualUsage D1-3判断新增部门操作可用(公共)  15345
        JudgeAddDeptUsableComRespDto judgeAddDeptUsableComRespDto = null;
        JudgeAddDeptUsableComReqDto judgeAddDeptUsableComReqDto = new JudgeAddDeptUsableComReqDto();
        if (reqDto != null) {
            judgeAddDeptUsableComReqDto.setDeptName(reqDto.getDeptName());//SimpleFieldAssign//sourceId:287424_1_15345
            judgeAddDeptUsableComReqDto.setParentDeptId(reqDto.getParentDeptId());//SimpleFieldAssign//sourceId:286395_1_15345
            judgeAddDeptUsableComReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:286396_1_15345
            judgeAddDeptUsableComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:286397_1_15345
        }

        /*D1-3判断新增部门操作可用(公共)[4334]   */
        Assert.isNull(judgeAddDeptUsableComReqDto.getDeptName(), "D1-3新增部门-D1-3判断新增部门操作可用(公共)-部门名称（中文）不能为空", false);
        Assert.isNull(judgeAddDeptUsableComReqDto.getOrganizationId(), "D1-3新增部门-D1-3判断新增部门操作可用(公共)-组织ID不能为空", false);
        judgeAddDeptUsableComRespDto = judgeAddDeptUsableCom(judgeAddDeptUsableComReqDto);
        Assert.isTrue(judgeAddDeptUsableComRespDto == null || judgeAddDeptUsableComRespDto.getOutputNum() == null, "返回值不能为空", false);


//virtualUsage D2-3查空间组织架构模式答案（跨服务）  5628
        QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto = null;
        QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto = new QueryConfItemMatchAnswerDetailComReqDto();
        queryConfItemMatchAnswerDetailComReqDto.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:104463_1_5628
        queryConfItemMatchAnswerDetailComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:104462_1_5628
        queryConfItemMatchAnswerDetailComReqDto.setConfItemCode("ORG_STRUCTURE_MODEL");//CUSTOM_CONVENTION//sourceId:104461_1_5628

        /*D2-3查空间组织架构模式答案（跨服务）[2486]   */
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getResultAspObjId(), "D1-3新增部门-D2-3查空间组织架构模式答案（跨服务）-答案归属对象ID不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getResultAspObjType(), "D1-3新增部门-D2-3查空间组织架构模式答案（跨服务）-答案归属对象类型不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getConfItemCode(), "D1-3新增部门-D2-3查空间组织架构模式答案（跨服务）-配置项标识不能为空", false);
        queryConfItemMatchAnswerDetailComRespDto = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto).getData();
        Assert.isTrue(queryConfItemMatchAnswerDetailComRespDto == null || queryConfItemMatchAnswerDetailComRespDto.getOptionResultId() == null, "返回值不能为空", false);


//virtualUsage D1计算部门层级加一(公共)  14478
        CalculateDeptLevelPlusOneComRespDto calculateDeptLevelPlusOneComRespDto = null;
        CalculateDeptLevelPlusOneComReqDto calculateDeptLevelPlusOneComReqDto = new CalculateDeptLevelPlusOneComReqDto();
        if (reqDto != null) {
            calculateDeptLevelPlusOneComReqDto.setDeptId(reqDto.getParentDeptId());//SimpleFieldAssign//sourceId:255658_1_14478
        }

        /*D1计算部门层级加一(公共)[4170]   */

        calculateDeptLevelPlusOneComRespDto = calculateDeptLevelPlusOneCom(calculateDeptLevelPlusOneComReqDto);
        Assert.isTrue(calculateDeptLevelPlusOneComRespDto == null || calculateDeptLevelPlusOneComRespDto.getOutputNum() == null, "返回值不能为空", false);


//virtualUsage 1-3-09查询部门列表  2074
        List<Dept> listDept = new ArrayList<>();
        if (calculateDeptLevelPlusOneComRespDto != null) {
            QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
            queryDeptListReq.setIsArchive("FALSE");//sourceId:136498_1_2074
            if (reqDto != null) {
                queryDeptListReq.setParentDeptId(reqDto.getParentDeptId());//SimpleFieldAssign//sourceId:54553_1_2074
                queryDeptListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:136496_1_2074
            }
            if (calculateDeptLevelPlusOneComRespDto != null) {
                queryDeptListReq.setLevelNumber(calculateDeptLevelPlusOneComRespDto.getOutputNum());//SimpleFieldAssign//sourceId:136497_1_2074
            }

            /*1-3-09查询部门列表[217]   */
            Assert.isNull(queryDeptListReq.getOrganizationId(), "D1-3新增部门-1-3-09查询部门列表-组织ID不能为空", false);
            Assert.isNull(queryDeptListReq.getLevelNumber(), "D1-3新增部门-1-3-09查询部门列表-层级不能为空", false);
            Assert.isNull(queryDeptListReq.getIsArchive(), "D1-3新增部门-1-3-09查询部门列表-是否存档不能为空", false);
            listDept = mDeptService.queryDeptList(queryDeptListReq);


        }
//virtualUsage M-获取当前内容标识（特殊方法）  5621
        //ModelCode: getCurrentContentCode
        AddGetCurrentCodeRespDto getCurrentContentCodeRes = null;
//    if(listDept !=null&& listDept.size()>0 ){
        AddGetCurrentCodeReqDto getCurrentContentCodeReq = new AddGetCurrentCodeReqDto();
        getCurrentContentCodeReq.setPeerContentCodeList(listDept.stream().map(item -> item.getDeptCode())
                .collect(Collectors.toList()));/*list-to-strings*///sourceId:104494_1_5621
        if (reqDto != null) {
            getCurrentContentCodeReq.setSuperiorContentCode(reqDto.getSuperiorContentCode());//SimpleFieldAssign//sourceId:104493_1_5621
        }

        /*M-获取当前内容标识（特殊方法）[1795]  用于新建内容时，获取当前层级内容标识。如新增空间、新增指标。入参上级标识CODE，当前层级所有标识CODE，获取本次新增内容的标识CODE */
        Assert.isNull(getCurrentContentCodeReq.getSuperiorContentCode(), "D1-3新增部门-M-获取当前内容标识（特殊方法）-上级内容标识不能为空", false);
        getCurrentContentCodeRes = nbOrg.addGetCurrentCode(getCurrentContentCodeReq);


//           }
//virtualUsage 1-3-09新增部门  5622
        String string = null;
        if (calculateDeptLevelPlusOneComRespDto != null) {
            Dept dept = new Dept();
            if (reqDto != null) {
                dept.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:23254_1_5622
                dept.setParentDeptId(reqDto.getParentDeptId());//SimpleFieldAssign//sourceId:23255_1_5622
                dept.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:23256_1_5622
                dept.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:23257_1_5622
                dept.setRoleMemberId(reqDto.getRoleMemberId());//SimpleFieldAssign//sourceId:23260_1_5622
                dept.setIsDirectlyMember(reqDto.getIsDirectlyMember());//SimpleFieldAssign//sourceId:23261_1_5622
                dept.setIsCreateLowerDept(reqDto.getIsCreateLowerDept());//SimpleFieldAssign//sourceId:23262_1_5622
                dept.setDeptNumber(reqDto.getDeptNumber());//SimpleFieldAssign//sourceId:23264_1_5622
                dept.setDeptName(reqDto.getDeptName());//SimpleFieldAssign//sourceId:23265_1_5622
                dept.setDeptEnName(reqDto.getDeptEnName());//SimpleFieldAssign//sourceId:23266_1_5622
                dept.setDeptShortName(reqDto.getDeptShortName());//SimpleFieldAssign//sourceId:23267_1_5622
                dept.setDeptDutyDesc(reqDto.getDeptDutyDesc());//SimpleFieldAssign//sourceId:23328_1_5622
                dept.setDeptTargetDesc(reqDto.getDeptTargetDesc());//SimpleFieldAssign//sourceId:23329_1_5622
                dept.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:49686_1_5622
            }
            if (getCurrentContentCodeRes != null) {
                dept.setDeptCode(String.valueOf(getCurrentContentCodeRes.getCurrentContentCode()));//SimpleFieldAssign//sourceId:54527_1_5622
            }
            if (calculateDeptLevelPlusOneComRespDto != null) {
                dept.setLevelNumber(calculateDeptLevelPlusOneComRespDto.getOutputNum());//SimpleFieldAssign//sourceId:54529_1_5622
            }

            /*1-3-09新增部门[214]   */
            Assert.isNull(dept.getTypeDictionaryId(), "D1-3新增部门-1-3-09新增部门-部门类型字典ID不能为空", false);
            Assert.isNull(dept.getDeptCode(), "D1-3新增部门-1-3-09新增部门-部门标识不能为空", false);
            Assert.isNull(dept.getOrganizationId(), "D1-3新增部门-1-3-09新增部门-组织ID不能为空", false);
            Assert.isNull(dept.getOrderNumber(), "D1-3新增部门-1-3-09新增部门-排序不能为空", false);
            Assert.isNull(dept.getLevelNumber(), "D1-3新增部门-1-3-09新增部门-层级不能为空", false);
            Assert.isNull(dept.getIsDirectlyMember(), "D1-3新增部门-1-3-09新增部门-是否有直属成员不能为空", false);
            Assert.isNull(dept.getIsCreateLowerDept(), "D1-3新增部门-1-3-09新增部门-是否可创建下级部门不能为空", false);
            Assert.isNull(dept.getDeptNumber(), "D1-3新增部门-1-3-09新增部门-部门编号不能为空", false);
            Assert.isNull(dept.getDeptName(), "D1-3新增部门-1-3-09新增部门-部门名称（中文）不能为空", false);
            Assert.isNull(dept.getDeptShortName(), "D1-3新增部门-1-3-09新增部门-部门简称不能为空", false);
            Assert.isNull(dept.getSubjectLifeCycle(), "D1-3新增部门-1-3-09新增部门-主体生命周期不能为空", false);
            string = mDeptService.addDept(dept);


            string_1 = string;
        }
//virtualUsage D1-1新增底层变更字段(本次新增变更记录)  9492
        AddBaseChangeColComRespDto addBaseChangeColComRespDto = null;
        if (string != null) {
            AddBaseChangeColComReqDto addBaseChangeColComReqDto = new AddBaseChangeColComReqDto();
            addBaseChangeColComReqDto.setTableTypeCode("OMS_ORG_DEPT");//sourceId:155435_1_9492
            addBaseChangeColComReqDto.setEntityName("deptId");//CUSTOM_CONVENTION//sourceId:162134_1_9492
            addBaseChangeColComReqDto.setObjectPropertyCode("deptId");//CUSTOM_CONVENTION//sourceId:155437_1_9492
            addBaseChangeColComReqDto.setObjectPropertyName("新增部门");//CUSTOM_CONVENTION//sourceId:181866_1_9492
            addBaseChangeColComReqDto.setOriColumnContent("无");//CUSTOM_CONVENTION//sourceId:155441_1_9492
            addBaseChangeColComReqDto.setSubjectTypeCode("DEPT_LOG_NAV");//sourceId:155442_1_9492
            addBaseChangeColComReqDto.setSubjectChangeType("ADD_DEPT");//CUSTOM_CONVENTION//sourceId:155443_1_9492
            addBaseChangeColComReqDto.setObjectTypeCode("OMS_ORG_ORGANIZATION");//sourceId:155444_1_9492
            addBaseChangeColComReqDto.setIsEditing("FALSE");//sourceId:155449_1_9492
            addBaseChangeColComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:155450_1_9492
            if (string != null) {
                addBaseChangeColComReqDto.setEntityId(string);//SimpleFieldAssign//sourceId:155436_1_9492
                addBaseChangeColComReqDto.setMetaDataColumnContent(string);//SimpleFieldAssign//sourceId:155439_1_9492
            }
            if (reqDto != null) {
                addBaseChangeColComReqDto.setColumnContent(reqDto.getDeptName());//SimpleFieldAssign//sourceId:155440_1_9492
                addBaseChangeColComReqDto.setObjectId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:155445_1_9492
            }

            /*D1-1新增底层变更字段(本次新增变更记录)[3533]   */
            Assert.isNull(addBaseChangeColComReqDto.getTableTypeCode(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-内容表类型编码不能为空", false);
            Assert.isNull(addBaseChangeColComReqDto.getEntityName(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-内容表主键行为日志英文名称不能为空", false);
            Assert.isNull(addBaseChangeColComReqDto.getEntityId(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-内容表主键ID不能为空", false);
            Assert.isNull(addBaseChangeColComReqDto.getObjectPropertyCode(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-变更字段英文名不能为空", false);
            Assert.isNull(addBaseChangeColComReqDto.getMetaDataColumnContent(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-变更字段内容不能为空", false);
            Assert.isNull(addBaseChangeColComReqDto.getObjectPropertyName(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-变更字段行为日志名称不能为空", false);
            Assert.isNull(addBaseChangeColComReqDto.getColumnContent(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-变更字段中文内容不能为空", false);
            Assert.isNull(addBaseChangeColComReqDto.getOriColumnContent(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-原始字段中文内容不能为空", false);
            Assert.isNull(addBaseChangeColComReqDto.getSubjectTypeCode(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-主体类型编码不能为空", false);
            Assert.isNull(addBaseChangeColComReqDto.getSubjectChangeType(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-主体变更日志类型不能为空", false);
            Assert.isNull(addBaseChangeColComReqDto.getObjectTypeCode(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-归属对象类型编码不能为空", false);
            Assert.isNull(addBaseChangeColComReqDto.getObjectId(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-归属对象内容ID不能为空", false);
            Assert.isNull(addBaseChangeColComReqDto.getIsEditing(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-是否未来不能为空", false);
            Assert.isNull(addBaseChangeColComReqDto.getSubjectLifeCycle(), "D1-3新增部门-D1-1新增底层变更字段(本次新增变更记录)-主体生命周期不能为空", false);
            addBaseChangeColComRespDto = changeColumnService.addBaseChangeColCom(addBaseChangeColComReqDto);


        }
        if ((queryConfItemMatchAnswerDetailComRespDto != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue() != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue().equals("PLAN_STAFFING"))) {
            //if(D2-3查空间组织架构模式答案（跨服务）.答案结果值 等于 计划编制型)  5623

            String string_2 = null;
            if (string != null) {
                StaffingAccount staffingAccount = new StaffingAccount();
                staffingAccount.setTypeCode("DEPARTMENT");//sourceId:42487_1_5624
                if (string != null) {
                    staffingAccount.setEntityId(string);//SimpleFieldAssign//sourceId:42488_1_5624
                }

                /*1-3-14新增编制账户[171]   */
                Assert.isNull(staffingAccount.getTypeCode(), "D1-3新增部门-1-3-14新增编制账户-所属对象实例类型不能为空", false);
                Assert.isNull(staffingAccount.getEntityId(), "D1-3新增部门-1-3-14新增编制账户-所属对象实例ID不能为空", false);
                string_2 = mStaffingAccountService.addStaffingAccount(staffingAccount);


            }
//processBranchName:正常结束 ,processBranchId:5625

        } else if ((queryConfItemMatchAnswerDetailComRespDto != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue() != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue().equals("NO_ORG"))) {
            //elseif(D2-3查空间组织架构模式答案（跨服务）.答案结果值 等于 无组织架构)  15340

//异常结束 15344
            throw new BizException("10300120", "对不起！组织架构配置异常，请联系系统管理员~！", false);
        }
        AddDeptRespDto retData = new AddDeptRespDto();
        if (string_1 != null) {
            retData.setDeptId(string_1);//SimpleFieldAssign//sourceId:30264_1
        }


        return retData;
    }

    /**
     * D1-2查一级部门详情(边界)[2199]
     * gen by moon at 10/16/2022, 1:02:26 AM
     */
    @Trace(operationName = "D1-2查一级部门详情(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryOneLevelDeptDetailBorderRespDto queryOneLevelDeptDetailBorder(QueryOneLevelDeptDetailBorderReqDto reqDto) {


        Dept dept_1 = null;
        Dept dept_3 = null;
//virtualUsage 1-3-09查当前部门层级  2575
        Dept dept = null;
        QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
        if (reqDto != null) {
            queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:64519_1_2575
        }

        /*1-3-09查当前部门层级[218]   */

        dept = mDeptService.queryDeptDetail(queryDeptDetailReq);


        dept_1 = dept;
        if ((dept != null && dept.getLevelNumber() == 1L)) {
            //if(1-3-09查当前部门层级.层级 等于 1)  2582

//processBranchName:正常结束 ,processBranchId:2583

        } else if ((dept != null && dept.getLevelNumber() > 1L)) {
            //elseif(1-3-09查当前部门层级.层级 大于 1)  2584

//ModelCode: findLevelCode
            QueryLookAncestorNodeDetailRespDto findLevelCodeRes = null;
            if (dept != null) {
                QueryLookAncestorNodeDetailReqDto findLevelCodeReq = new QueryLookAncestorNodeDetailReqDto();
                findLevelCodeReq.setToLevelNumber(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:64582_1_2585
                if (dept != null) {
                    findLevelCodeReq.setDeptCode(dept.getDeptCode());//SimpleFieldAssign//sourceId:64578_1_2585
                    findLevelCodeReq.setLevelNumber(dept.getLevelNumber());//SimpleFieldAssign//sourceId:64579_1_2585
                }

                /*M-查找祖先(特殊方法）[2202]  通过标识、层级找1级，2级..X级的的CODE */
                Assert.isNull(findLevelCodeReq.getDeptCode(), "D1-2查一级部门详情(边界)-M-查找祖先(特殊方法）-部门标识不能为空", false);
                Assert.isNull(findLevelCodeReq.getLevelNumber(), "D1-2查一级部门详情(边界)-M-查找祖先(特殊方法）-层级不能为空", false);
                Assert.isNull(findLevelCodeReq.getToLevelNumber(), "D1-2查一级部门详情(边界)-M-查找祖先(特殊方法）-目标层级不能为空", false);
                findLevelCodeRes = nbOrg.queryLookAncestorNodeDetail(findLevelCodeReq);


            }
            Dept dept_2 = null;
            QueryDeptDetailReq queryDeptDetailReq_1 = new QueryDeptDetailReq();
            if (findLevelCodeRes != null) {
                queryDeptDetailReq_1.setDeptCode(findLevelCodeRes.getDeptCode());//SimpleFieldAssign//sourceId:64610_1_2586
            }

            /*1-3-09查询部门详情（一级部门ID）[218]   */
            Assert.isNull(queryDeptDetailReq_1.getDeptCode(), "D1-2查一级部门详情(边界)-1-3-09查询部门详情（一级部门ID）-部门标识不能为空", false);
            dept_2 = mDeptService.queryDeptDetail(queryDeptDetailReq_1);


            dept_3 = dept_2;
//processBranchName:正常结束 ,processBranchId:2587

        }
        QueryOneLevelDeptDetailBorderRespDto retData = new QueryOneLevelDeptDetailBorderRespDto();
        if (dept_1 != null) {
            retData.setDeptId(dept_1.getDeptId());//SimpleFieldAssign//sourceId:64625_1
        }
        if (dept_3 != null) {
            retData.setDeptId(dept_3.getDeptId());//SimpleFieldAssign//sourceId:64625_1
        }


        return retData;
    }

    /**
     * D1-3修改组织[797]
     * gen by moon at 10/2/2022, 7:48:21 AM
     */
    @Trace(operationName = "D1-3修改组织")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public UpdateOrgRespDto updateOrg(UpdateOrgReqDto reqDto) {


        //virtualUsage 1-3-12修改组织  1712
        boolean bOOLEAN;
        Organization organization = new Organization();
        if (reqDto != null) {
            organization.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:34008_1_1712
            organization.setOrganizationNumber(reqDto.getOrganizationNumber());//SimpleFieldAssign//sourceId:34009_1_1712
            organization.setOrganizationName(reqDto.getOrganizationName());//SimpleFieldAssign//sourceId:34010_1_1712
            organization.setManageLockStatus(reqDto.getManageLockStatus());//SimpleFieldAssign//sourceId:34015_1_1712
            organization.setReasonOfManageLock(reqDto.getReasonOfManageLock());//SimpleFieldAssign//sourceId:43746_1_1712
            organization.setReasonOfUsingLock(reqDto.getReasonOfUsingLock());//SimpleFieldAssign//sourceId:43747_1_1712
            organization.setUsingLockStatus(reqDto.getUsingLockStatus());//SimpleFieldAssign//sourceId:43748_1_1712
        }

        /*1-3-12修改组织[197]   */
        Assert.isNull(organization.getOrganizationId(), "D1-3修改组织-1-3-12修改组织-组织ID不能为空", false);
        bOOLEAN = mOrganizationService.updateOrg(organization);


//virtualUsage 1-3-12查询组织详情  1713
        Organization organization_1 = null;
        QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
        queryOrgDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:233015_1_1713
        if (reqDto != null) {
            queryOrgDetailReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:51100_1_1713
        }

        /*1-3-12查询组织详情[201]   */
        Assert.isNull(queryOrgDetailReq.getSpaceId(), "D1-3修改组织-1-3-12查询组织详情-创建于空间ID不能为空", false);
        organization_1 = mOrganizationService.queryOrgDetail(queryOrgDetailReq);


        if ((organization_1 != null && organization_1.getSubjectLifeCycle() != null && organization_1.getSubjectLifeCycle().equals("CURRENTLY_VALID"))) {
            //if(1-3-12查询组织详情.主体生命周期 等于 当前有效)  1715

//ModelCode: clearSpaceInfoFromRedis
            ClearSpaceInfoFromRedisRespDto clearSpaceInfoFromRedisRes = null;
            if (organization_1 != null) {
                ClearSpaceInfoFromRedisReqDto clearSpaceInfoFromRedisReq = new ClearSpaceInfoFromRedisReqDto();
                if (organization_1 != null) {
                    clearSpaceInfoFromRedisReq.setSpaceId(organization_1.getSpaceId());//SimpleFieldAssign//sourceId:106785_1_1716
                }

                /*M-Redis清空空间信息（特殊方法）[1555]  用于清空REDIS中空间缓存信息，在空间信息修改时触发 */
                Assert.isNull(clearSpaceInfoFromRedisReq.getSpaceId(), "D1-3修改组织-M-Redis清空空间信息（特殊方法）-空间ID不能为空", false);
                clearSpaceInfoFromRedisRes = nbOrg.clearSpaceInfoFromRedis(clearSpaceInfoFromRedisReq);


            }
//processBranchName:正常结束 ,processBranchId:1717

        } else {
            //else  1718

//processBranchName:正常结束 ,processBranchId:1719

        }
        UpdateOrgRespDto retData = new UpdateOrgRespDto();


        return retData;
    }

    /**
     * D1-3删除部门[666]
     * gen by moon at 10/2/2022, 7:45:04 AM
     */
    @Trace(operationName = "D1-3删除部门")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public DeleteDeptRespDto deleteDept(DeleteDeptReqDto reqDto) {


        //virtualUsage 1-3-09查询部门列表（查子部门）  946
        List<Dept> listDept = new ArrayList<>();
        QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
        if (reqDto != null) {
            queryDeptListReq.setParentDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:42257_1_946
        }

        /*1-3-09查询部门列表（查子部门）[217]   */
        Assert.isNull(queryDeptListReq.getParentDeptId(), "D1-3删除部门-1-3-09查询部门列表（查子部门）-父级部门ID不能为空", false);
        listDept = mDeptService.queryDeptList(queryDeptListReq);


        if ((listDept != null && listDept != null && listDept.size() == 0)) {
            //if(1-3-09查询部门列表（查是否有子部门）.部门列表数据集条数 等于 0)  947

            List<InductionRecord> listInductionRecord = new ArrayList<>();
            QueryInductionRecordListReq queryInductionRecordListReq = new QueryInductionRecordListReq();
            queryInductionRecordListReq.setSubjectLifeCycle("EDITING");//sourceId:301520_1_950
            if (reqDto != null) {
                queryInductionRecordListReq.setEntityId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:41471_1_950
            }

            /*1-3-13查询就职记录列表（查部门成员）[166]   */
            Assert.isNull(queryInductionRecordListReq.getEntityId(), "D1-3删除部门-1-3-13查询就职记录列表（查部门成员）-就职单位对象实例ID不能为空", false);
            Assert.isNull(queryInductionRecordListReq.getSubjectLifeCycle(), "D1-3删除部门-1-3-13查询就职记录列表（查部门成员）-主体生命周期不能为空", false);
            listInductionRecord = mInductionRecordService.queryInductionRecordList(queryInductionRecordListReq);


            if ((listInductionRecord != null && listInductionRecord != null && listInductionRecord.size() == 0)) {
                //if(1-3-13查询就职记录列表（查是否有直属部门成员）.就职记录列表数据集条数 等于 0)  951

                List<DutyTargetDetail> listDutyTargetDetail = new ArrayList<>();
                QueryTargetDetailsListReq queryTargetDetailsListReq = new QueryTargetDetailsListReq();
                queryTargetDetailsListReq.setTypeCode("DEPARTMENT");//sourceId:39307_1_954
                queryTargetDetailsListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:301522_1_954
                if (reqDto != null) {
                    queryTargetDetailsListReq.setEntityId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:39308_1_954
                }

                /*1-3-10查询目标职责明细列表[181]   */
                Assert.isNull(queryTargetDetailsListReq.getTypeCode(), "D1-3删除部门-1-3-10查询目标职责明细列表-所属对象实例类型不能为空", false);
                Assert.isNull(queryTargetDetailsListReq.getEntityId(), "D1-3删除部门-1-3-10查询目标职责明细列表-所属对象实例ID不能为空", false);
                Assert.isNull(queryTargetDetailsListReq.getSpaceId(), "D1-3删除部门-1-3-10查询目标职责明细列表-创建于空间ID不能为空", false);
                listDutyTargetDetail = mDutyTargetDetailService.queryTargetDetailsList(queryTargetDetailsListReq);


                boolean bOOLEAN;
                if (listDutyTargetDetail != null && listDutyTargetDetail.size() > 0) {
                    List<String> listString = new ArrayList<>();
                    listString = listDutyTargetDetail.stream().map(item -> item.getDutyTargetDetailId())
                            .collect(Collectors.toList());/*list-to-strings*///sourceId:39287_1_955

                    /*1-3-10批量删除目标职责明细[942]   */

                    bOOLEAN = mDutyTargetDetailService.batchDeleteTargetDetail(listString);


                }
                List<Staffing> listStaffing = new ArrayList<>();
                QueryStaffingListReq queryStaffingListReq = new QueryStaffingListReq();
                queryStaffingListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:301524_1_958
                if (reqDto != null) {
                    queryStaffingListReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:42396_1_958
                }

                /*1-3-15查询编制列表（查部门下占用编制）[192]   */
                Assert.isNull(queryStaffingListReq.getDeptId(), "D1-3删除部门-1-3-15查询编制列表（查部门下占用编制）-部门ID不能为空", false);
                Assert.isNull(queryStaffingListReq.getSpaceId(), "D1-3删除部门-1-3-15查询编制列表（查部门下占用编制）-创建于空间ID不能为空", false);
                listStaffing = mStaffingService.queryStaffingList(queryStaffingListReq);


                boolean bOOLEAN_1;
                if (listStaffing != null && listStaffing.size() > 0) {
                    List<Staffing> listStaffing_2 = new ArrayList<>();
                    listStaffing_2 = //objList-to-objLists
                            listStaffing.stream().map(item -> {
                                Staffing elm = new Staffing();
                                elm.setStaffingId(item.getStaffingId());//SimpleFieldAssign//sourceId:20215_2_959
                                elm.setDeptId("---");//NULL//sourceId:28962_2_959
                                return elm;
                            }).collect(Collectors.toList());//objList-to-objLists//sourceId:42401_1_959

                    /*1-3-14批量修改编制（清除部门ID)[931]   */

                    bOOLEAN_1 = mStaffingService.batchUpdateStaffing(listStaffing_2);


                }
                StaffingAccount staffingAccount = null;
                QueryStaffingAccountDetailReq queryStaffingAccountDetailReq = new QueryStaffingAccountDetailReq();
                if (reqDto != null) {
                    queryStaffingAccountDetailReq.setEntityId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:42477_1_960
                }

                /*1-3-14查询编制账户详情（查部门编制账户ID)[175]   */
                Assert.isNull(queryStaffingAccountDetailReq.getEntityId(), "D1-3删除部门-1-3-14查询编制账户详情（查部门编制账户ID)-所属对象实例ID不能为空", false);
                staffingAccount = mStaffingAccountService.queryStaffingAccountDetail(queryStaffingAccountDetailReq);


                boolean bOOLEAN_2;
                if (staffingAccount != null) {
                    DeleteStaffingAccountReq deleteStaffingAccountReq = new DeleteStaffingAccountReq();
                    if (staffingAccount != null) {
                        deleteStaffingAccountReq.setStaffingAccountId(staffingAccount.getStaffingAccountId());//SimpleFieldAssign//sourceId:42413_1_961
                    }

                    /*1-3-14删除编制数量账户（删除部门编制账户）[173]   */
                    Assert.isNull(deleteStaffingAccountReq.getStaffingAccountId(), "D1-3删除部门-1-3-14删除编制数量账户（删除部门编制账户）-编制账户ID不能为空", false);
                    bOOLEAN_2 = mStaffingAccountService.deleteStaffingAccount(deleteStaffingAccountReq);


                }
                List<DeptPositionRelationship> listDeptPositionRelationship = new ArrayList<>();
                QueryOrgDeptPositionListReq queryOrgDeptPositionListReq = new QueryOrgDeptPositionListReq();
                queryOrgDeptPositionListReq.setOrgTypeCode("DEPARTMENT");//sourceId:42310_1_962
                if (reqDto != null) {
                    queryOrgDeptPositionListReq.setOrgEntityId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:42311_1_962
                }

                /*1-3-11查询部门岗位职务关系列表[193]   */
                Assert.isNull(queryOrgDeptPositionListReq.getOrgTypeCode(), "D1-3删除部门-1-3-11查询部门岗位职务关系列表-所属实例类型编码不能为空", false);
                Assert.isNull(queryOrgDeptPositionListReq.getOrgEntityId(), "D1-3删除部门-1-3-11查询部门岗位职务关系列表-所属对象实例ID不能为空", false);
                listDeptPositionRelationship = mDeptPositionRelationshipService.queryOrgDeptPositionList(queryOrgDeptPositionListReq);


                List<StaffingAccount> listStaffingAccount = new ArrayList<>();
                if (listDeptPositionRelationship != null && listDeptPositionRelationship.size() > 0) {
                    BatchQueryBelongMatchingStaffingAccountReq batchQueryBelongMatchingStaffingAccountReq = new BatchQueryBelongMatchingStaffingAccountReq();
                    batchQueryBelongMatchingStaffingAccountReq.setStaffingAccountList(listDeptPositionRelationship.stream().map(item -> item.getOrgPositionRelationshipId())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:42315_1_963

                    /*1-3-14批量查询编制账户列表（查部门岗位、职务编制账户）[1484]   */

                    listStaffingAccount = mStaffingAccountService.batchQueryBelongMatchingStaffingAccount(batchQueryBelongMatchingStaffingAccountReq);


                }
                boolean bOOLEAN_3;
                if (listStaffingAccount != null && listStaffingAccount.size() > 0) {
                    List<String> listString_1 = new ArrayList<>();
                    listString_1 = listStaffingAccount.stream().map(item -> item.getStaffingAccountId())
                            .collect(Collectors.toList());/*list-to-strings*///sourceId:42327_1_964

                    /*1-3-14批量删除编制数量账户（部门岗位、职务）[939]   */

                    bOOLEAN_3 = mStaffingAccountService.batchDeleteStaffingAccount(listString_1);


                }
                boolean bOOLEAN_4;
                if (listDeptPositionRelationship != null && listDeptPositionRelationship.size() > 0) {
                    List<String> listString_2 = new ArrayList<>();
                    listString_2 = listDeptPositionRelationship.stream().map(item -> item.getOrgPositionRelationshipId())
                            .collect(Collectors.toList());/*list-to-strings*///sourceId:42362_1_965

                    /*1-3-11批量删除部门岗位职务关系[941]   */

                    bOOLEAN_4 = mDeptPositionRelationshipService.batchDeleteDeptPosition(listString_2);


                }
                boolean bOOLEAN_5;
                String string = new String();
                if (reqDto != null) {
                    string = reqDto.getDeptId();
                    ;//SimpleFieldAssign//sourceId:19965_1_966
                }

                /*1-3-09删除部门[216]   */
                Assert.isNull(string, "D1-3删除部门-1-3-09删除部门-部门ID不能为空", false);
                bOOLEAN_5 = mDeptService.deleteDept(string);


                BatchDeleteBaseChangeColComRespDto batchDeleteBaseChangeColComRespDto = null;
                BatchDeleteBaseChangeColComReqDto batchDeleteBaseChangeColComReqDto = new BatchDeleteBaseChangeColComReqDto();
                batchDeleteBaseChangeColComReqDto.setTableTypeCode("OMS_ORG_DEPT");//sourceId:155493_1_9508
                if (reqDto != null) {
                    batchDeleteBaseChangeColComReqDto.setEntityId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:155494_1_9508
                }

                /*D1-1批量删底层变更字段(公共)[3540]   */
                Assert.isNull(batchDeleteBaseChangeColComReqDto.getTableTypeCode(), "D1-3删除部门-D1-1批量删底层变更字段(公共)-内容表类型编码不能为空", false);
                Assert.isNull(batchDeleteBaseChangeColComReqDto.getEntityId(), "D1-3删除部门-D1-1批量删底层变更字段(公共)-内容表主键ID不能为空", false);
                batchDeleteBaseChangeColComRespDto = changeColumnService.batchDeleteBaseChangeColCom(batchDeleteBaseChangeColComReqDto);


//processBranchName:正常结束 ,processBranchId:967

            } else {
                //else  952

//异常结束 953
                throw new BizException("10300008", "对不起，部门下有成员，不可删除～！", false);
            }
        } else {
            //else  948

//异常结束 949
            throw new BizException("10300009", "对不起，部门下有下级部门，不可删除～！", false);
        }
        DeleteDeptRespDto retData = new DeleteDeptRespDto();


        return retData;
    }

    /**
     * D1-2查中基层部门详情(边界)[2604]
     * gen by moon at 12/19/2023, 6:55:06 PM
     */
    @Trace(operationName = "D1-2查中基层部门详情(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryMidBaseCourseDetailBorderRespDto queryMidBaseCourseDetailBorder(QueryMidBaseCourseDetailBorderReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_1 = null;
        if ((reqDto != null && reqDto.getDeptId() == null && reqDto != null && reqDto.getInductionUnitTypeCode() != null && reqDto.getInductionUnitTypeCode().equals("DEPT"))) {
            //if((D1-2查中基层部门详情(边界).部门ID 值等于空  and D1-2查中基层部门详情(边界).就职单位类型实例 等于 部门))  14411

            InductionRecord inductionRecord = null;
            QueryinductionRecordDetailReq queryinductionRecordDetailReq = new QueryinductionRecordDetailReq();
            queryinductionRecordDetailReq.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:255064_1_14412
            queryinductionRecordDetailReq.setInductionUnitTypeCode("DEPT");//sourceId:255065_1_14412
            queryinductionRecordDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:255066_1_14412

            /*1-3-13查询就职记录详情[165]   */
            Assert.isNull(queryinductionRecordDetailReq.getOriginalRoleMemberId(), "D1-2查中基层部门详情(边界)-1-3-13查询就职记录详情-身份人员ID不能为空", false);
            Assert.isNull(queryinductionRecordDetailReq.getInductionUnitTypeCode(), "D1-2查中基层部门详情(边界)-1-3-13查询就职记录详情-就职单位类型实例不能为空", false);
            Assert.isNull(queryinductionRecordDetailReq.getSpaceId(), "D1-2查中基层部门详情(边界)-1-3-13查询就职记录详情-创建于空间ID不能为空", false);
            inductionRecord = mInductionRecordService.queryinductionRecordDetail(queryinductionRecordDetailReq)/*vcase invoke 本地 method 方法调用;*/;


            if ((inductionRecord == null)) {
                //if(1-3-13查询是否有部门下就职记录.出参 值等于空 )  14413

//processBranchName:正常结束 ,processBranchId:14414

            } else {
                //else  14415

//异常结束 14416
                throw new BizException("500", "系统异常，请联系管理员！", false);
            }
        } else if ((reqDto != null && reqDto.getDeptId() != null && reqDto != null && reqDto.getInductionUnitTypeCode() != null && reqDto.getInductionUnitTypeCode().equals("DEPT"))) {
            //elseif((D1-2查中基层部门详情(边界).部门ID 值不等于空  and D1-2查中基层部门详情(边界).就职单位类型实例 等于 部门))  14417

            Dept dept = null;
            QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
            if (reqDto != null) {
                queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:255261_1_14447
            }

            /*1-3-09查询部门层级[218]   */
            Assert.isNull(queryDeptDetailReq.getDeptId(), "D1-2查中基层部门详情(边界)-1-3-09查询部门层级-部门ID不能为空", false);
            dept = mDeptService.queryDeptDetail(queryDeptDetailReq)/*vcase invoke 本地 method 方法调用;*/;
            Assert.isTrue(dept == null || dept.getDeptId() == null, "找不到数据，系统异常", false);


            if ((dept != null && dept.getLevelNumber() != null && dept != null && dept.getLevelNumber() == 1L && !(dept != null && dept.getDeptBusinessIdentity() != null && dept.getDeptBusinessIdentity().equals("SCHOOL_LEADER")))) {
                //if((1-3-09查询部门层级.层级 值不等于空  and 1-3-09查询部门层级.层级 等于 1 and 1-3-09查询部门层级.部门业务身份 不等于 校领导))  14419

//ModelCode: receptionService
                QueryReceiveFieldDetailRespDto receptionServiceRes = null;
                if (dept != null) {
                    QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
                    if (dept != null) {
                        receptionServiceReq.setCustomField1(dept.getDeptId());//SimpleFieldAssign//sourceId:1428387_1_57013
                        receptionServiceReq.setCustomField2(dept.getDeptCode());//SimpleFieldAssign//sourceId:1428388_1_57013
                        receptionServiceReq.setCustomField3(dept.getDeptShortName());//SimpleFieldAssign//sourceId:1428389_1_57013
                    }

                    /*M1-接收中基层部门信息[3715]  用于特殊方法接收上游入参。 */
                    Assert.isNull(receptionServiceReq.getCustomField1(), "D1-2查中基层部门详情(边界)-M1-接收中基层部门信息-自定义字段1不能为空", false);
                    Assert.isNull(receptionServiceReq.getCustomField2(), "D1-2查中基层部门详情(边界)-M1-接收中基层部门信息-自定义字段2不能为空", false);
                    Assert.isNull(receptionServiceReq.getCustomField3(), "D1-2查中基层部门详情(边界)-M1-接收中基层部门信息-自定义字段3不能为空", false);
                    receptionServiceRes = nbOrg.queryReceiveFieldDetail(receptionServiceReq);


                    receptionServiceRes_1 = receptionServiceRes;
                }
            } else if ((dept != null && dept.getLevelNumber() != null && dept != null && dept.getLevelNumber() > 1L)) {
                //elseif((1-3-09查询部门层级.层级 值不等于空  and 1-3-09查询部门层级.层级 大于 1))  14421

//ModelCode: findLevelCode
                QueryLookAncestorNodeDetailRespDto findLevelCodeRes = null;
                if (dept != null) {
                    QueryLookAncestorNodeDetailReqDto findLevelCodeReq = new QueryLookAncestorNodeDetailReqDto();
                    findLevelCodeReq.setToLevelNumber(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:80378_1_14422
                    if (dept != null) {
                        findLevelCodeReq.setDeptCode(dept.getDeptCode());//SimpleFieldAssign//sourceId:80375_1_14422
                        findLevelCodeReq.setLevelNumber(dept.getLevelNumber());//SimpleFieldAssign//sourceId:80376_1_14422
                    }

                    /*M-查找祖先(特殊方法）[2202]  通过标识、层级找1级，2级..X级的的CODE */
                    Assert.isNull(findLevelCodeReq.getDeptCode(), "D1-2查中基层部门详情(边界)-M-查找祖先(特殊方法）-部门标识不能为空", false);
                    Assert.isNull(findLevelCodeReq.getLevelNumber(), "D1-2查中基层部门详情(边界)-M-查找祖先(特殊方法）-层级不能为空", false);
                    Assert.isNull(findLevelCodeReq.getToLevelNumber(), "D1-2查中基层部门详情(边界)-M-查找祖先(特殊方法）-目标层级不能为空", false);
                    findLevelCodeRes = nbOrg.queryLookAncestorNodeDetail(findLevelCodeReq);


                }
                Dept dept_2 = null;
                QueryDeptDetailReq queryDeptDetailReq_1 = new QueryDeptDetailReq();
                if (findLevelCodeRes != null) {
                    queryDeptDetailReq_1.setDeptCode(findLevelCodeRes.getDeptCode());//SimpleFieldAssign//sourceId:80475_1_14446
                }

                /*1-3-09查询一级部门ID[218]   */
                Assert.isNull(queryDeptDetailReq_1.getDeptCode(), "D1-2查中基层部门详情(边界)-1-3-09查询一级部门ID-部门标识不能为空", false);
                dept_2 = mDeptService.queryDeptDetail(queryDeptDetailReq_1)/*vcase invoke 本地 method 方法调用;*/;
                Assert.isTrue(dept_2 == null || dept_2.getDeptId() == null, "找不到数据，系统异常", false);


                if ((!(dept_2 != null && dept_2.getDeptBusinessIdentity() != null && dept_2.getDeptBusinessIdentity().equals("SCHOOL_LEADER")))) {
                    //if(1-3-09查询一级部门ID.部门业务身份 不等于 校领导)  57003

                    Dept dept_4 = null;
                    if (dept != null) {
                        QueryDeptDetailReq queryDeptDetailReq_2 = new QueryDeptDetailReq();
                        queryDeptDetailReq_2.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:256310_1_57004
                        if (dept != null) {
                            queryDeptDetailReq_2.setDeptId(dept.getDeptId());//SimpleFieldAssign//sourceId:256309_1_57004
                        }

                        /*1-3-09查询基层部门（重复查询）[218]   */
                        Assert.isNull(queryDeptDetailReq_2.getDeptId(), "D1-2查中基层部门详情(边界)-1-3-09查询基层部门（重复查询）-部门ID不能为空", false);
                        Assert.isNull(queryDeptDetailReq_2.getSubjectLifeCycle(), "D1-2查中基层部门详情(边界)-1-3-09查询基层部门（重复查询）-主体生命周期不能为空", false);
                        dept_4 = mDeptService.queryDeptDetail(queryDeptDetailReq_2)/*vcase invoke 本地 method 方法调用;*/;
                        Assert.isTrue(dept_4 == null || dept_4.getDeptId() == null, "找不到数据，系统异常", false);


                    }
//ModelCode: receptionService
                    QueryReceiveFieldDetailRespDto receptionServiceRes_2 = null;
                    if (dept_2 != null && dept_4 != null) {
                        QueryReceiveFieldDetailReqDto receptionServiceReq_1 = new QueryReceiveFieldDetailReqDto();
                        if (dept_2 != null) {
                            receptionServiceReq_1.setCustomField1(dept_2.getDeptId());//SimpleFieldAssign//sourceId:1428387_1_57008
                            receptionServiceReq_1.setCustomField2(dept_2.getDeptCode());//SimpleFieldAssign//sourceId:1428388_1_57008
                            receptionServiceReq_1.setCustomField3(dept_2.getDeptShortName());//SimpleFieldAssign//sourceId:1428389_1_57008
                        }
                        if (dept_4 != null) {
                            receptionServiceReq_1.setCustomField4(dept_4.getDeptId());//SimpleFieldAssign//sourceId:1428390_1_57008
                            receptionServiceReq_1.setCustomField5(dept_4.getDeptCode());//SimpleFieldAssign//sourceId:1428391_1_57008
                            receptionServiceReq_1.setCustomField6(dept_4.getDeptShortName());//SimpleFieldAssign//sourceId:1428386_1_57008
                        }

                        /*M1-接收中基层部门信息[3715]  用于特殊方法接收上游入参。 */
                        Assert.isNull(receptionServiceReq_1.getCustomField1(), "D1-2查中基层部门详情(边界)-M1-接收中基层部门信息-自定义字段1不能为空", false);
                        Assert.isNull(receptionServiceReq_1.getCustomField2(), "D1-2查中基层部门详情(边界)-M1-接收中基层部门信息-自定义字段2不能为空", false);
                        Assert.isNull(receptionServiceReq_1.getCustomField3(), "D1-2查中基层部门详情(边界)-M1-接收中基层部门信息-自定义字段3不能为空", false);
                        receptionServiceRes_2 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_1);


                        receptionServiceRes_1 = receptionServiceRes_2;
                    }
                }
            }
        } else if ((reqDto != null && reqDto.getInductionUnitTypeCode() != null && reqDto.getInductionUnitTypeCode().equals("ORG"))) {
            //elseif(D1-2查中基层部门详情(边界).就职单位类型实例 等于 组织)  14622

//processBranchName:正常结束 ,processBranchId:14623

        }
        QueryMidBaseCourseDetailBorderRespDto retData = new QueryMidBaseCourseDetailBorderRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setPrimaryDeptId(receptionServiceRes_1.getCustomField1());//SimpleFieldAssign//sourceId:1428398_1
            retData.setPrimaryDeptCode(receptionServiceRes_1.getCustomField2());//SimpleFieldAssign//sourceId:1428399_1
            retData.setPrimaryDeptName(receptionServiceRes_1.getCustomField3());//SimpleFieldAssign//sourceId:1428400_1
            retData.setGrassrootsDeptId(receptionServiceRes_1.getCustomField4());//SimpleFieldAssign//sourceId:1428401_1
            retData.setGrassrootsDeptCode(receptionServiceRes_1.getCustomField5());//SimpleFieldAssign//sourceId:1428402_1
            retData.setGrassrootsDeptName(receptionServiceRes_1.getCustomField6());//SimpleFieldAssign//sourceId:1428403_1
        }


        return retData;
    }

    /**
     * D1-3查询部门树状结构列表（管理）[1521]
     * gen by moon at 10/2/2022, 12:10:12 AM
     */
    @Trace(operationName = "D1-3查询部门树状结构列表（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryMgtDeptTreeListRespDto queryMgtDeptTreeList(QueryMgtDeptTreeListReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//步骤0: 1-3-09查询部门列表 - queryDeptList
        List<Dept> listDept = new ArrayList<>();
        QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
        queryDeptListReq.setIsArchive("FALSE");//sourceId:49800_1
        if (reqDto != null) {
            queryDeptListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:158299_1
            queryDeptListReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:160006_1
        }

        /*1-3-09查询部门列表[217]   */
        Assert.isNull(queryDeptListReq.getOrganizationId(), "D1-3查询部门树状结构列表（管理）-1-3-09查询部门列表-组织ID不能为空", false);
        Assert.isNull(queryDeptListReq.getTypeDictionaryId(), "D1-3查询部门树状结构列表（管理）-1-3-09查询部门列表-部门类型字典ID不能为空", false);
        Assert.isNull(queryDeptListReq.getIsArchive(), "D1-3查询部门树状结构列表（管理）-1-3-09查询部门列表-是否存档不能为空", false);
        listDept = mDeptService.queryDeptList(queryDeptListReq);


        listDept_1 = listDept;

        QueryMgtDeptTreeListRespDto retData = new QueryMgtDeptTreeListRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:158304_1


        return retData;
    }

    /**
     * D1-3批量查询组织列表[2148]
     * gen by moon at 10/15/2022, 5:39:33 PM
     */
    @Trace(operationName = "D1-3批量查询组织列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public BatchQueryOrgListBorderRespDto batchQueryOrgListBorder(BatchQueryOrgListBorderReqDto reqDto) {


        List<Organization> listOrganization_1 = new ArrayList<>();
//步骤0: 1-3-12批量查询组织列表 - batchQueryOrg
        List<Organization> listOrganization = new ArrayList<>();
        BatchQueryOrgReq batchQueryOrgReq = new BatchQueryOrgReq();
        batchQueryOrgReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:258694_1
        if (reqDto != null) {
            batchQueryOrgReq.setOrgList(reqDto.getOrgList());//list-field-assign//sourceId:62444_1
            batchQueryOrgReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:259463_1
        }

        /*1-3-12批量查询组织列表[1346]   */
        Assert.isNull(batchQueryOrgReq.getSubjectLifeCycle(), "D1-3批量查询组织列表-1-3-12批量查询组织列表-主体生命周期不能为空", false);
        listOrganization = mOrganizationService.batchQueryOrg(batchQueryOrgReq);


        listOrganization_1 = listOrganization;

        BatchQueryOrgListBorderRespDto retData = new BatchQueryOrgListBorderRespDto();
        retData.setOrgList(listOrganization_1.stream().map(item -> BeanUtil.toBean(item, OrgDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:62449_1


        return retData;
    }


    /**
     * D1-3查询树状结构下级部门列表（边界）[1845]
     * gen by moon at 8/10/2022, 3:20:54 AM
     */
    @Trace(operationName = "D1-3查询树状结构下级部门列表（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySubordinateDeptTreeListRespDto querySubordinateDeptTreeList(QuerySubordinateDeptTreeListReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//步骤0: 1-3-09查询部门树状结构列表 - queryDeptTreeList
        List<Dept> listDept = new ArrayList<>();
        QueryDeptTreeListReq queryDeptTreeListReq = new QueryDeptTreeListReq();
        queryDeptTreeListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:56615_1
        if (reqDto != null) {
            queryDeptTreeListReq.setDeptId(reqDto.getDeptId());//sourceId:56611_1
            queryDeptTreeListReq.setDeptCode(reqDto.getDeptCode());//sourceId:56612_1
            queryDeptTreeListReq.setIsArchive(reqDto.getIsArchive());//sourceId:56613_1
            queryDeptTreeListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:56614_1
        }

        /*1-3-09查询部门树状结构列表[1846]   */
        Assert.isNull(queryDeptTreeListReq.getSpaceId(), "D1-3查询树状结构下级部门列表（边界）-1-3-09查询部门树状结构列表-创建于空间ID不能为空", false);
        listDept = mDeptService.queryDeptTreeList(queryDeptTreeListReq);

        listDept_1 = listDept;

        QuerySubordinateDeptTreeListRespDto retData = new QuerySubordinateDeptTreeListRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, com.sg.dto.biz.framework.res.DeptDto.class)).collect(Collectors.toList()));//sourceId:63996_1


        return retData;
    }

    /**
     * D1-3查询组织列表[1584]
     * gen by moon at 10/2/2022, 12:13:22 AM
     */
    @Trace(operationName = "D1-3查询组织列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryOrgListRespDto queryOrgList(QueryOrgListReqDto reqDto) {


        List<Organization> listOrganization_1 = new ArrayList<>();
//步骤0: 1-3-12查询组织列表 - queryOrgList
        List<Organization> listOrganization = new ArrayList<>();
        QueryOrgListReq queryOrgListReq = new QueryOrgListReq();
        if (reqDto != null) {
            queryOrgListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:45869_1
            queryOrgListReq.setManageLockStatus(reqDto.getManageLockStatus());//SimpleFieldAssign//sourceId:45881_1
            queryOrgListReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:45875_1
        }

        /*1-3-12查询组织列表[200]   */

        listOrganization = mOrganizationService.queryOrgList(queryOrgListReq);


        listOrganization_1 = listOrganization;

        QueryOrgListRespDto retData = new QueryOrgListRespDto();
        retData.setOrgList(listOrganization_1.stream().map(item -> BeanUtil.toBean(item, OrgDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:45870_1


        return retData;
    }

    /**
     * D1-3存档部门[1520]
     * gen by moon at 10/2/2022, 12:09:58 AM
     */
    @Trace(operationName = "D1-3存档部门")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ArchiveDeptRespDto archiveDept(ArchiveDeptReqDto reqDto) {


        //virtualUsage 1-3-09查询部门列表（查子部门）  869
        List<Dept> listDept = new ArrayList<>();
        QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
        queryDeptListReq.setIsArchive("FALSE");//sourceId:41786_1_869
        if (reqDto != null) {
            queryDeptListReq.setParentDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:301679_1_869
        }

        /*1-3-09查询部门列表（查子部门）[217]   */
        Assert.isNull(queryDeptListReq.getParentDeptId(), "D1-3存档部门-1-3-09查询部门列表（查子部门）-父级部门ID不能为空", false);
        Assert.isNull(queryDeptListReq.getIsArchive(), "D1-3存档部门-1-3-09查询部门列表（查子部门）-是否存档不能为空", false);
        listDept = mDeptService.queryDeptList(queryDeptListReq);


//virtualUsage 1-3-09查询部门详情  12490
        Dept dept = null;
        QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
        queryDeptDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:195248_1_12490
        if (reqDto != null) {
            queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:195226_1_12490
        }

        /*1-3-09查询部门详情[218]   */
        Assert.isNull(queryDeptDetailReq.getDeptId(), "D1-3存档部门-1-3-09查询部门详情-部门ID不能为空", false);
        Assert.isNull(queryDeptDetailReq.getSubjectLifeCycle(), "D1-3存档部门-1-3-09查询部门详情-主体生命周期不能为空", false);
        dept = mDeptService.queryDeptDetail(queryDeptDetailReq);


        if ((listDept != null && listDept != null && listDept.size() == 0 && listDept != null && listDept != null && listDept.size() == 0)) {
            //if(1-3-09查询部门列表（查是否存在子部门）.部门列表数据集条数 等于 0)  891

            List<InductionRecord> listInductionRecord = new ArrayList<>();
            QueryInductionRecordListReq queryInductionRecordListReq = new QueryInductionRecordListReq();
            queryInductionRecordListReq.setIsArchive("FALSE");//sourceId:41834_1_894
            if (reqDto != null) {
                queryInductionRecordListReq.setEntityId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:41560_1_894
            }

            /*1-3-13查询就职记录列表（查成员）[166]   */
            Assert.isNull(queryInductionRecordListReq.getEntityId(), "D1-3存档部门-1-3-13查询就职记录列表（查成员）-就职单位对象实例ID不能为空", false);
            Assert.isNull(queryInductionRecordListReq.getIsArchive(), "D1-3存档部门-1-3-13查询就职记录列表（查成员）-是否存档不能为空", false);
            listInductionRecord = mInductionRecordService.queryInductionRecordList(queryInductionRecordListReq);


            if ((listInductionRecord != null && listInductionRecord != null && listInductionRecord.size() == 0)) {
                //if(1-3-13查询就职记录列表（查成员）.就职记录列表数据集条数 等于 0)  895

                boolean bOOLEAN;
                Dept dept_2 = new Dept();
                dept_2.setIsArchive("TRUE");//sourceId:49777_1_898
                dept_2.setSubjectLifeCycle("ARCHIVING");//sourceId:49775_1_898
                if (reqDto != null) {
                    dept_2.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:41770_1_898
                }

                /*1-3-14修改部门（存档部门）[215]   */
                Assert.isNull(dept_2.getDeptId(), "D1-3存档部门-1-3-14修改部门（存档部门）-部门ID不能为空", false);
                bOOLEAN = mDeptService.updateDept(dept_2);


                ArchiveBaseChangeColComRespDto archiveBaseChangeColComRespDto = null;
                if (dept != null) {
                    ArchiveBaseChangeColComReqDto archiveBaseChangeColComReqDto = new ArchiveBaseChangeColComReqDto();
                    archiveBaseChangeColComReqDto.setTableTypeCode("OMS_ORG_DEPT");//sourceId:181645_1_9496
                    archiveBaseChangeColComReqDto.setEntityName("deptId");//CUSTOM_CONVENTION//sourceId:195211_1_9496
                    archiveBaseChangeColComReqDto.setObjectPropertyCode("deptId");//CUSTOM_CONVENTION//sourceId:195212_1_9496
                    archiveBaseChangeColComReqDto.setObjectPropertyName("裁撤部门");//CUSTOM_CONVENTION//sourceId:195213_1_9496
                    archiveBaseChangeColComReqDto.setOriColumnContent("数据正常");//CUSTOM_CONVENTION//sourceId:195216_1_9496
                    archiveBaseChangeColComReqDto.setSubjectTypeCode("DEPT_LOG_NAV");//sourceId:195217_1_9496
                    archiveBaseChangeColComReqDto.setSubjectChangeType("ARCHIVE_DEPT");//CUSTOM_CONVENTION//sourceId:195218_1_9496
                    archiveBaseChangeColComReqDto.setObjectTypeCode("OMS_ORG_ORGANIZATION");//sourceId:195219_1_9496
                    if (reqDto != null) {
                        archiveBaseChangeColComReqDto.setEntityId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:181646_1_9496
                        archiveBaseChangeColComReqDto.setMetaDataColumnContent(reqDto.getDeptId());//SimpleFieldAssign//sourceId:195214_1_9496
                    }
                    if (dept != null) {
                        archiveBaseChangeColComReqDto.setColumnContent(dept.getDeptShortName());//SimpleFieldAssign//sourceId:195215_1_9496
                        archiveBaseChangeColComReqDto.setObjectId(dept.getOrganizationId());//SimpleFieldAssign//sourceId:195220_1_9496
                    }

                    /*D1-1存档底层变更字段(本次存档变更记录)[3535]   */
                    Assert.isNull(archiveBaseChangeColComReqDto.getTableTypeCode(), "D1-3存档部门-D1-1存档底层变更字段(本次存档变更记录)-内容表类型编码不能为空", false);
                    Assert.isNull(archiveBaseChangeColComReqDto.getEntityId(), "D1-3存档部门-D1-1存档底层变更字段(本次存档变更记录)-内容表主键ID不能为空", false);
                    Assert.isNull(archiveBaseChangeColComReqDto.getEntityName(), "D1-3存档部门-D1-1存档底层变更字段(本次存档变更记录)-内容表主键行为日志英文名称不能为空", false);
                    Assert.isNull(archiveBaseChangeColComReqDto.getObjectPropertyCode(), "D1-3存档部门-D1-1存档底层变更字段(本次存档变更记录)-变更字段英文名不能为空", false);
                    Assert.isNull(archiveBaseChangeColComReqDto.getObjectPropertyName(), "D1-3存档部门-D1-1存档底层变更字段(本次存档变更记录)-变更字段行为日志名称不能为空", false);
                    Assert.isNull(archiveBaseChangeColComReqDto.getMetaDataColumnContent(), "D1-3存档部门-D1-1存档底层变更字段(本次存档变更记录)-变更字段内容不能为空", false);
                    Assert.isNull(archiveBaseChangeColComReqDto.getColumnContent(), "D1-3存档部门-D1-1存档底层变更字段(本次存档变更记录)-变更字段中文内容不能为空", false);
                    Assert.isNull(archiveBaseChangeColComReqDto.getOriColumnContent(), "D1-3存档部门-D1-1存档底层变更字段(本次存档变更记录)-原始字段中文内容不能为空", false);
                    Assert.isNull(archiveBaseChangeColComReqDto.getSubjectTypeCode(), "D1-3存档部门-D1-1存档底层变更字段(本次存档变更记录)-主体类型编码不能为空", false);
                    Assert.isNull(archiveBaseChangeColComReqDto.getSubjectChangeType(), "D1-3存档部门-D1-1存档底层变更字段(本次存档变更记录)-主体变更日志类型不能为空", false);
                    Assert.isNull(archiveBaseChangeColComReqDto.getObjectTypeCode(), "D1-3存档部门-D1-1存档底层变更字段(本次存档变更记录)-归属对象类型编码不能为空", false);
                    Assert.isNull(archiveBaseChangeColComReqDto.getObjectId(), "D1-3存档部门-D1-1存档底层变更字段(本次存档变更记录)-归属对象内容ID不能为空", false);
                    archiveBaseChangeColComRespDto = changeColumnService.archiveBaseChangeColCom(archiveBaseChangeColComReqDto);


                }
            } else {
                //else  896

//异常结束 897
                throw new BizException("10300012", "对不起，部门下有成员，不可裁撤部门～！", false);
            }
        } else {
            //else  892

//异常结束 893
            throw new BizException("10300013", "对不起，部门下有下级部门，不可裁撤部门～！", false);
        }
        ArchiveDeptRespDto retData = new ArchiveDeptRespDto();


        return retData;
    }

    /**
     * D1-3查询部门列表
     */
    @Trace(operationName = "D1-3查询部门列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptListRespDto queryDeptList(QueryDeptListReqDto reqDto) {


        //步骤0: 1-3-09查询部门列表 - queryDeptList
        List<Dept> listDept = null;
        QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
        if (reqDto != null) {
            queryDeptListReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//sourceId:45792_1
            queryDeptListReq.setParentDeptId(reqDto.getParentDeptId());//sourceId:41871_1
            queryDeptListReq.setOrganizationId(reqDto.getOrganizationId());//sourceId:41872_1
            queryDeptListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:45900_1
            queryDeptListReq.setIsArchive(reqDto.getIsArchive());//sourceId:42146_1
        }

        /*1-3-09查询部门列表[217]   */
        listDept = mDeptService.queryDeptList(queryDeptListReq);


        QueryDeptListRespDto retData = new QueryDeptListRespDto();
        retData.setDeptList(listDept.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//sourceId:41953_1


        return retData;
    }

    /**
     * D1-3修改部门[662]
     * gen by moon at 8/22/2024, 11:49:26 PM
     */
    @Trace(operationName = "D1-3修改部门")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public UpdateDeptRespDto updateDept(UpdateDeptReqDto reqDto) {


        //virtualUsage D1-3判断修改部门操作可用(公共)  15316
        JudgeUpdateUsableComRespDto judgeUpdateUsableComRespDto = null;
        JudgeUpdateUsableComReqDto judgeUpdateUsableComReqDto = new JudgeUpdateUsableComReqDto();
        if (reqDto != null) {
            judgeUpdateUsableComReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:286400_1_15316
            judgeUpdateUsableComReqDto.setDeptName(reqDto.getDeptName());//SimpleFieldAssign//sourceId:302007_1_15316
            judgeUpdateUsableComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:301869_1_15316
        }

        /*D1-3判断修改部门操作可用(公共)[4333]   */
        Assert.isNull(judgeUpdateUsableComReqDto.getDeptId(), "D1-3修改部门-D1-3判断修改部门操作可用(公共)-部门ID不能为空", false);
        judgeUpdateUsableComRespDto = judgeUpdateUsableCom(judgeUpdateUsableComReqDto)/*vcase invoke 同服务,同domain*/;
        Assert.isTrue(judgeUpdateUsableComRespDto == null || judgeUpdateUsableComRespDto.getOutputNum() == null, "找不到数据，系统异常", false);


//virtualUsage 1-3-09修改部门  1596
        boolean bOOLEAN;
        Dept dept = new Dept();
        if (reqDto != null) {
            dept.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:23517_1_1596
            dept.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:23518_1_1596
            dept.setRoleMemberId(reqDto.getRoleMemberId());//SimpleFieldAssign//sourceId:23519_1_1596
            dept.setIsDirectlyMember(reqDto.getIsDirectlyMember());//SimpleFieldAssign//sourceId:23520_1_1596
            dept.setIsCreateLowerDept(reqDto.getIsCreateLowerDept());//SimpleFieldAssign//sourceId:23521_1_1596
            dept.setDeptBusinessIdentity(reqDto.getDeptBusinessIdentity());//SimpleFieldAssign//sourceId:1983995_1_1596
            dept.setDeptNumber(reqDto.getDeptNumber());//SimpleFieldAssign//sourceId:23522_1_1596
            dept.setDeptName(reqDto.getDeptName());//SimpleFieldAssign//sourceId:23523_1_1596
            dept.setDeptEnName(reqDto.getDeptEnName());//SimpleFieldAssign//sourceId:23524_1_1596
            dept.setDeptShortName(reqDto.getDeptShortName());//SimpleFieldAssign//sourceId:23525_1_1596
            dept.setDeptDutyDesc(reqDto.getDeptDutyDesc());//SimpleFieldAssign//sourceId:23526_1_1596
            dept.setDeptTargetDesc(reqDto.getDeptTargetDesc());//SimpleFieldAssign//sourceId:23527_1_1596
            dept.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:23530_1_1596
            dept.setDirectorIdCardName(reqDto.getDirectorIdCardName());//SimpleFieldAssign//sourceId:160120_1_1596
        }

        /*1-3-09修改部门[215]   */
        Assert.isNull(dept.getDeptId(), "D1-3修改部门-1-3-09修改部门-部门ID不能为空", false);
        bOOLEAN = mDeptService.updateDept(dept)/*vcase invoke 本地 method 方法调用;*/;


//virtualUsage D1-1修改底层变更字段(公共)  15320
        UpdateBaseChangeColComRespDto updateBaseChangeColComRespDto = null;
        UpdateBaseChangeColComReqDto updateBaseChangeColComReqDto = new UpdateBaseChangeColComReqDto();
        updateBaseChangeColComReqDto.setTableTypeCode("OMS_ORG_DEPT");//sourceId:286545_1_15320
        if (reqDto != null) {
            updateBaseChangeColComReqDto.setEntityId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:286546_1_15320
            updateBaseChangeColComReqDto.setColumnContent(reqDto.getDeptShortName());//SimpleFieldAssign//sourceId:286547_1_15320
        }

        /*D1-1修改底层变更字段(公共)[4335]   */
        Assert.isNull(updateBaseChangeColComReqDto.getTableTypeCode(), "D1-3修改部门-D1-1修改底层变更字段(公共)-内容表类型编码不能为空", false);
        Assert.isNull(updateBaseChangeColComReqDto.getEntityId(), "D1-3修改部门-D1-1修改底层变更字段(公共)-内容表主键ID不能为空", false);
        Assert.isNull(updateBaseChangeColComReqDto.getColumnContent(), "D1-3修改部门-D1-1修改底层变更字段(公共)-变更后字段中文内容不能为空", false);
        updateBaseChangeColComRespDto = changeColumnService.updateBaseChangeColCom(updateBaseChangeColComReqDto)/*vcase invoke isSameApp*/;


        if ((reqDto != null && reqDto.getSubjectLifeCycle() != null && reqDto.getSubjectLifeCycle().equals("CURRENTLY_VALID"))) {
            //if(D1-3修改部门.主体生命周期 等于 当前有效)  1597

            QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto = null;
            QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto = new QueryConfItemMatchAnswerDetailComReqDto();
            queryConfItemMatchAnswerDetailComReqDto.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:286385_1_15525
            queryConfItemMatchAnswerDetailComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:286384_1_15525
            queryConfItemMatchAnswerDetailComReqDto.setConfItemCode("ORG_STRUCTURE_MODEL");//CUSTOM_CONVENTION//sourceId:286383_1_15525

            /*D2-3查空间组织架构模式（跨服务）[2486]   */
            Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getResultAspObjId(), "D1-3修改部门-D2-3查空间组织架构模式（跨服务）-开通对象ID不能为空", false);
            Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getResultAspObjType(), "D1-3修改部门-D2-3查空间组织架构模式（跨服务）-开通对象类型编码不能为空", false);
            Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getConfItemCode(), "D1-3修改部门-D2-3查空间组织架构模式（跨服务）-配置项标识不能为空", false);
            queryConfItemMatchAnswerDetailComRespDto = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
            Assert.isTrue(queryConfItemMatchAnswerDetailComRespDto == null || queryConfItemMatchAnswerDetailComRespDto.getOptionResultId() == null, "找不到数据，系统异常", false);


            if ((queryConfItemMatchAnswerDetailComRespDto != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue() != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue().equals("PLAN_STAFFING"))) {
                //if(D2-3查空间组织架构模式（跨服务）.答案结果值 等于 计划编制型)  15527

                StaffingAccount staffingAccount = null;
                QueryStaffingAccountDetailReq queryStaffingAccountDetailReq = new QueryStaffingAccountDetailReq();
                queryStaffingAccountDetailReq.setTypeCode("DEPARTMENT");//sourceId:287444_1_15528

                /*1-3-14查询编制账户详情[175]   */
                Assert.isNull(queryStaffingAccountDetailReq.getTypeCode(), "D1-3修改部门-1-3-14查询编制账户详情-所属对象实例类型不能为空", false);
                Assert.isNull(queryStaffingAccountDetailReq.getEntityId(), "D1-3修改部门-1-3-14查询编制账户详情-所属对象实例ID不能为空", false);
                staffingAccount = mStaffingAccountService.queryStaffingAccountDetail(queryStaffingAccountDetailReq)/*vcase invoke 本地 method 方法调用;*/;
                Assert.isTrue(staffingAccount == null || staffingAccount.getStaffingAccountId() == null, "找不到数据，系统异常", false);


                boolean bOOLEAN_1;
                StaffingAccount staffingAccount_2 = new StaffingAccount();
                staffingAccount_2.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:287455_1_15529

                /*1-3-14修改编制账户[172]   */
                Assert.isNull(staffingAccount_2.getStaffingAccountId(), "D1-3修改部门-1-3-14修改编制账户-编制账户ID不能为空", false);
                Assert.isNull(staffingAccount_2.getSubjectLifeCycle(), "D1-3修改部门-1-3-14修改编制账户-主体生命周期不能为空", false);
                bOOLEAN_1 = mStaffingAccountService.updateStaffingAccount(staffingAccount_2)/*vcase invoke 本地 method 方法调用;*/;


//processBranchName:正常结束 ,processBranchId:15537

            }
        } else if ((reqDto != null && reqDto.getSubjectLifeCycle() == null || reqDto != null && reqDto.getSubjectLifeCycle() != null && reqDto.getSubjectLifeCycle().equals("ARCHIVING"))) {
            //elseif((D1-3修改部门.主体生命周期 值等于空  or D1-3修改部门.主体生命周期 等于 历史存档))  15533

//异常结束 15534
            throw new BizException("10300125", "对不起，不可修改部门，当前部门状态出现异常，请联系管理员~。", false);
        }
        UpdateDeptRespDto retData = new UpdateDeptRespDto();


        return retData;
    }

    /**
     * D1-3查询部门详情[4552]
     * gen by moon at 9/22/2023, 6:27:29 PM
     */
    @Trace(operationName = "D1-3查询部门详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptDetailRespDto queryDeptDetail(QueryDeptDetailReqDto reqDto) {


        Dept dept_1 = null;
        Userinfo userinfo_1 = null;
//virtualUsage 1-3-09查询部门详情  16227
        Dept dept = null;
        QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
        queryDeptDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:323563_1_16227
        if (reqDto != null) {
            queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:323541_1_16227
        }

        /*1-3-09查询部门详情[218]   */
        Assert.isNull(queryDeptDetailReq.getDeptId(), "D1-3查询部门详情-1-3-09查询部门详情-部门ID不能为空", false);
        Assert.isNull(queryDeptDetailReq.getSubjectLifeCycle(), "D1-3查询部门详情-1-3-09查询部门详情-主体生命周期不能为空", false);
        dept = mDeptService.queryDeptDetail(queryDeptDetailReq)/*vcase invoke 本地 method 方法调用;*/;
        Assert.isTrue(dept == null || dept.getDeptId() == null, "找不到数据，系统异常", false);

        dept_1 = dept;
        if ((dept != null && dept.getRoleMemberId() != null)) {
            //if(1-3-09查询部门详情.可选分管领导角色成员ID 值不等于空 )  16228

            RoleMember roleMember = null;
            if (dept != null) {
                QueryRoleRelDetailReq queryRoleRelDetailReq = new QueryRoleRelDetailReq();
                queryRoleRelDetailReq.setRelationshipValid("FALSE");//sourceId:323755_1_16233
                queryRoleRelDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:323756_1_16233
                if (dept != null) {
                    queryRoleRelDetailReq.setRoleMemberId(dept.getRoleMemberId());//SimpleFieldAssign//sourceId:323754_1_16233
                }

                /*1-2-13查询角色人员详情（查询分管领导）[335]   */
                Assert.isNull(queryRoleRelDetailReq.getRoleMemberId(), "D1-3查询部门详情-1-2-13查询角色人员详情（查询分管领导）-角色人员ID不能为空", false);
                Assert.isNull(queryRoleRelDetailReq.getRelationshipValid(), "D1-3查询部门详情-1-2-13查询角色人员详情（查询分管领导）-是否失效不能为空", false);
                Assert.isNull(queryRoleRelDetailReq.getSubjectLifeCycle(), "D1-3查询部门详情-1-2-13查询角色人员详情（查询分管领导）-主体生命周期不能为空", false);
                roleMember = mRoleMemberService.queryRoleRelDetail(queryRoleRelDetailReq)/*vcase invoke 本地 method 方法调用;*/;


            }
            Userinfo userinfo = null;
            if (roleMember != null) {
                QueryUserinfoDetailReq queryUserinfoDetailReq = new QueryUserinfoDetailReq();
                if (roleMember != null) {
                    queryUserinfoDetailReq.setUserId(roleMember.getUserId());//SimpleFieldAssign//sourceId:323655_1_16234
                }

                /*1-2-02查询个人资料详情（查询分管领导）[155]   */
                Assert.isNull(queryUserinfoDetailReq.getUserId(), "D1-3查询部门详情-1-2-02查询个人资料详情（查询分管领导）-账号不能为空", false);
                userinfo = mUserinfoService.queryUserinfoDetail(queryUserinfoDetailReq)/*vcase invoke 本地 method 方法调用;*/;


                userinfo_1 = userinfo;
            }
        }
        QueryDeptDetailRespDto retData = new QueryDeptDetailRespDto();
        if (dept_1 != null) {
            retData.setDeptId(dept_1.getDeptId());//SimpleFieldAssign//sourceId:323773_1
            retData.setDeptNumber(dept_1.getDeptNumber());//SimpleFieldAssign//sourceId:323774_1
            retData.setDeptName(dept_1.getDeptName());//SimpleFieldAssign//sourceId:323775_1
            retData.setDeptEnName(dept_1.getDeptEnName());//SimpleFieldAssign//sourceId:323776_1
            retData.setDeptShortName(dept_1.getDeptShortName());//SimpleFieldAssign//sourceId:323777_1
            retData.setDeptDutyDesc(dept_1.getDeptDutyDesc());//SimpleFieldAssign//sourceId:323778_1
            retData.setDeptTargetDesc(dept_1.getDeptTargetDesc());//SimpleFieldAssign//sourceId:323779_1
            retData.setRoleMemberId(dept_1.getRoleMemberId());//SimpleFieldAssign//sourceId:323780_1
            retData.setDirectorIdCardName(dept_1.getDirectorIdCardName());//SimpleFieldAssign//sourceId:323781_1
            retData.setPartyAndYouthDirectorIdCardName(dept_1.getPartyAndYouthDirectorIdCardName());//SimpleFieldAssign//sourceId:1128882_1
        }
        if (userinfo_1 != null) {
            retData.setIdCardName(userinfo_1.getIdCardName());//SimpleFieldAssign//sourceId:323783_1
            retData.setNickName(userinfo_1.getNickName());//SimpleFieldAssign//sourceId:323784_1
            retData.setUserFace(userinfo_1.getUserFace());//SimpleFieldAssign//sourceId:323785_1
        }


        return retData;
    }

    /**
     * D1-3查部门列表(公共)[1513]
     * gen by moon at 11/21/2022, 11:53:31 PM
     */
    @Trace(operationName = "D1-3查部门列表(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptListComRespDto queryDeptListCom(QueryDeptListComReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//步骤0: 1-3-09查询部门列表 - queryDeptList
        List<Dept> listDept = new ArrayList<>();
        QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
        if (reqDto != null) {
            queryDeptListReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:45792_1
            queryDeptListReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:324324_1
            queryDeptListReq.setParentDeptId(reqDto.getParentDeptId());//SimpleFieldAssign//sourceId:41871_1
            queryDeptListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:201714_1
            queryDeptListReq.setLevelNumber(reqDto.getLevelNumber());//SimpleFieldAssign//sourceId:100299_1
            queryDeptListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:45900_1
            queryDeptListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:42146_1
        }

        /*1-3-09查询部门列表[217]   */

        listDept = mDeptService.queryDeptList(queryDeptListReq);


        listDept_1 = listDept;

        QueryDeptListComRespDto retData = new QueryDeptListComRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:41953_1


        return retData;
    }

    /**
     * D1-3判断管理模式权限(管理)[3719]
     * gen by moon at 10/2/2022, 3:38:26 AM
     */
    @Trace(operationName = "D1-3判断管理模式权限(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public JudgeMgtPowerRespDto judgeMgtPower(JudgeMgtPowerReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_1 = null;
        QueryReceiveFieldDetailRespDto receptionServiceRes_3 = null;
        QueryReceiveFieldDetailRespDto receptionServiceRes_5 = null;
        QueryReceiveFieldDetailRespDto receptionServiceRes_7 = null;
//virtualUsage 1-3-09查询当前有效部门列表  11747
        List<Dept> listDept = new ArrayList<>();
        QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
        queryDeptListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:181147_1_11747
        if (reqDto != null) {
            queryDeptListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:181145_1_11747
        }

        /*1-3-09查询当前有效部门列表[217]   */
        Assert.isNull(queryDeptListReq.getOrganizationId(), "D1-3判断管理模式权限(管理)-1-3-09查询当前有效部门列表-组织ID不能为空", false);
        Assert.isNull(queryDeptListReq.getSubjectLifeCycle(), "D1-3判断管理模式权限(管理)-1-3-09查询当前有效部门列表-主体生命周期不能为空", false);
        listDept = mDeptService.queryDeptList(queryDeptListReq);


//virtualUsage 1-3-12查询组织的管理状态等  11093
        Organization organization = null;
        QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
        queryOrgDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:173074_1_11093
        if (reqDto != null) {
            queryOrgDetailReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:173067_1_11093
        }

        /*1-3-12查询组织的管理状态等[201]   */
        Assert.isNull(queryOrgDetailReq.getOrganizationId(), "D1-3判断管理模式权限(管理)-1-3-12查询组织的管理状态等-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailReq.getSpaceId(), "D1-3判断管理模式权限(管理)-1-3-12查询组织的管理状态等-创建于空间ID不能为空", false);
        organization = mOrganizationService.queryOrgDetail(queryOrgDetailReq);
        Assert.isTrue(organization == null || organization.getOrganizationId() == null, "返回值不能为空", false);


//virtualUsage 1-1-01查询组织ID的底层框架服务批次列表  14087
        List<Batch> listBatch = new ArrayList<>();
        QueryBaseBatchListReq queryBaseBatchListReq = new QueryBaseBatchListReq();
        queryBaseBatchListReq.setPurposeTypeCode("ORG");//sourceId:173795_1_14087
        queryBaseBatchListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:173712_1_14087
        if (reqDto != null) {
            queryBaseBatchListReq.setAscriptionObjectId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:173794_1_14087
        }

        /*1-1-01查询组织ID的底层框架服务批次列表[227]   */
        Assert.isNull(queryBaseBatchListReq.getAscriptionObjectId(), "D1-3判断管理模式权限(管理)-1-1-01查询组织ID的底层框架服务批次列表-归属对象ID不能为空", false);
        Assert.isNull(queryBaseBatchListReq.getPurposeTypeCode(), "D1-3判断管理模式权限(管理)-1-1-01查询组织ID的底层框架服务批次列表-用途类型编码不能为空", false);
        Assert.isNull(queryBaseBatchListReq.getSpaceId(), "D1-3判断管理模式权限(管理)-1-1-01查询组织ID的底层框架服务批次列表-创建于空间ID不能为空", false);
        listBatch = mBatchService.queryBaseBatchList(queryBaseBatchListReq);


//virtualUsage 1-1-01查询当前最新批次信息  14375
        Batch batch = null;
        if (organization != null) {
            QueryBaseBatchDetailReq queryBaseBatchDetailReq = new QueryBaseBatchDetailReq();
            queryBaseBatchDetailReq.setPurposeTypeCode("ORG");//sourceId:254828_1_14375
            queryBaseBatchDetailReq.setIsNewbatch("TRUE");//sourceId:254830_1_14375
            if (organization != null) {
                queryBaseBatchDetailReq.setAscriptionObjectId(organization.getOrganizationId());//SimpleFieldAssign//sourceId:254829_1_14375
            }

            /*1-1-01查询当前最新批次信息[44]   */
            Assert.isNull(queryBaseBatchDetailReq.getAscriptionObjectId(), "D1-3判断管理模式权限(管理)-1-1-01查询当前最新批次信息-归属对象ID不能为空", false);
            Assert.isNull(queryBaseBatchDetailReq.getPurposeTypeCode(), "D1-3判断管理模式权限(管理)-1-1-01查询当前最新批次信息-用途类型编码不能为空", false);
            Assert.isNull(queryBaseBatchDetailReq.getIsNewbatch(), "D1-3判断管理模式权限(管理)-1-1-01查询当前最新批次信息-是否最新批次不能为空", false);
            batch = mBatchService.queryBaseBatchDetail(queryBaseBatchDetailReq);


        }
        if ((listDept != null && listDept != null && listDept.size() > 0 && listBatch != null && listBatch != null && listBatch.size() == 0) && (organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("AUTO_LOCK") || organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("COMMON_LOCK")) && (organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("UNMANNED_MGT"))) {
            //if((1-3-09查询当前有效部门列表.部门列表数据集条数 大于 0 and 1-1-01查询组织ID的底层框架服务批次列表.底层框架批次列表数据集条数 等于 0) and (1-3-12查询组织的管理状态等.管理锁定状态 等于 自动锁定 or 1-3-12查询组织的管理状态等.管理锁定状态 等于 普通锁定) and 1-3-12查询组织的管理状态等.当前管理对象类型 等于 --请选择--无人管理)  11094

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq.setEnterMgtPowerType("FIRST_MANAGE");//sourceId:173106_1_11111

            /*M1-获取接收字段（特殊方法）-首次管理[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq.getEnterMgtPowerType(), "D1-3判断管理模式权限(管理)-M1-获取接收字段（特殊方法）-首次管理-成员管理权限类型不能为空", false);
            receptionServiceRes = nbOrg.queryReceiveFieldDetail(receptionServiceReq);


            receptionServiceRes_1 = receptionServiceRes;
        } else if ((listDept != null && listDept != null && listDept.size() > 0 && listBatch != null && listBatch != null && listBatch.size() >= 1 && organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("UNMANNED_MGT") && batch != null && batch.getSubjectLifeCycle() != null && batch.getSubjectLifeCycle().equals("CURRENTLY_VALID")) && (organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("COMMON_LOCK") || organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("AUTO_LOCK"))) {
            //elseif((1-3-09查询当前有效部门列表.部门列表数据集条数 大于 0 and 1-1-01查询组织ID的底层框架服务批次列表.底层框架批次列表数据集条数 大于等于 1 and 1-3-12查询组织的管理状态等.当前管理对象类型 等于 无人管理 and 1-1-01查询当前最新批次信息.主体生命周期 等于 当前有效) and (1-3-12查询组织的管理状态等.管理锁定状态 等于 普通锁定 or 1-3-12查询组织的管理状态等.管理锁定状态 等于 自动锁定))  11118

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_2 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_1 = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq_1.setEnterMgtPowerType("FOLLOW_MANAGE");//sourceId:173198_1_11125

            /*M1-获取接收字段（特殊方法）-后续管理[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_1.getEnterMgtPowerType(), "D1-3判断管理模式权限(管理)-M1-获取接收字段（特殊方法）-后续管理-成员管理权限类型不能为空", false);
            receptionServiceRes_2 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_1);


            receptionServiceRes_3 = receptionServiceRes_2;
        } else if ((listDept != null && listDept != null && listDept.size() == 0 || organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("SPEC_LOCK") || organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("DEPTMENT") || organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("POST_SYSTEM") || organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("ORG_TYPE_DICTIONARY") || organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("POSITION") || organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("STAFFING"))) {
            //elseif((1-3-09查询当前有效部门列表.部门列表数据集条数 等于 0 or 1-3-12查询组织的管理状态等.管理锁定状态 等于 特权锁定 or 1-3-12查询组织的管理状态等.当前管理对象类型 等于 部门 or 1-3-12查询组织的管理状态等.当前管理对象类型 等于 岗位体系 or 1-3-12查询组织的管理状态等.当前管理对象类型 等于 组织架构数据字典 or 1-3-12查询组织的管理状态等.当前管理对象类型 等于 职务 or 1-3-12查询组织的管理状态等.当前管理对象类型 等于 编制))  11128

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_4 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_2 = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq_2.setEnterMgtPowerType("MIS_MANAGE");//sourceId:173201_1_11211

            /*M1-获取接收字段（特殊方法）-不可管理[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_2.getEnterMgtPowerType(), "D1-3判断管理模式权限(管理)-M1-获取接收字段（特殊方法）-不可管理-成员管理权限类型不能为空", false);
            receptionServiceRes_4 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_2);


            receptionServiceRes_5 = receptionServiceRes_4;
        } else if ((organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("UNLOCK") && organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("MEMBER") && listDept != null && listDept != null && listDept.size() > 0 && listBatch != null && listBatch != null && listBatch.size() > 0 && batch != null && batch.getSubjectLifeCycle() != null && batch.getSubjectLifeCycle().equals("EDITING"))) {
            //elseif((1-3-12查询组织的管理状态等.管理锁定状态 等于 未锁定 and 1-3-12查询组织的管理状态等.当前管理对象类型 等于 成员 and 1-3-09查询当前有效部门列表.部门列表数据集条数 大于 0 and 1-1-01查询组织ID的底层框架服务批次列表.底层框架批次列表数据集条数 大于 0 and 1-1-01查询当前最新批次信息.主体生命周期 等于 正在编辑))  11217

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_6 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_3 = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq_3.setEnterMgtPowerType("CUR_MANAGE");//sourceId:173818_1_11237

            /*M1-获取接收字段（特殊方法）-当前正在管理[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_3.getEnterMgtPowerType(), "D1-3判断管理模式权限(管理)-M1-获取接收字段（特殊方法）-当前正在管理-成员管理权限类型不能为空", false);
            receptionServiceRes_6 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_3);


            receptionServiceRes_7 = receptionServiceRes_6;
        } else if ((batch != null && batch.getSubjectLifeCycle() != null && batch.getSubjectLifeCycle().equals("ARCHIVING"))) {
            //elseif(1-1-01查询当前最新批次信息.主体生命周期 等于 历史存档)  14777

//异常结束 14796
            throw new BizException("B10400096", "对不起，当前管理已经是历史，出现管理未知异常，请联系管理员~~。", false);
        } else if ((organization != null && organization.getManageLockStatus() == null)) {
            //elseif(1-3-12查询组织的管理状态等.管理锁定状态 值等于空 )  14779

//异常结束 14795
            throw new BizException("10300095", "对不起！管理状态未知异常，请联系管理员~", false);
        } else if ((organization != null && organization.getCurrentManageObjectType() == null)) {
            //elseif(1-3-12查询组织的管理状态等.当前管理对象类型 值等于空 )  14780

//异常结束 14794
            throw new BizException("10300093", "对不起，当前谁在管理出现未知异常，请联系管理员。~", false);
        } else if ((listDept == null)) {
            //elseif(1-3-09查询当前有效部门列表.出参 值等于空 )  14781

//异常结束 14793
            throw new BizException("10300097", "对不起，部门数据出现未知异常，请联系管理员~~。", false);
        } else if ((listBatch == null) && (!(organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("AUTO_LOCK")) || !(organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("COMMON_LOCK")))) {
            //elseif(1-1-01查询组织ID的底层框架服务批次列表.出参 值等于空  and (1-3-12查询组织的管理状态等.管理锁定状态 不等于 自动锁定 or 1-3-12查询组织的管理状态等.管理锁定状态 不等于 普通锁定))  14782

//异常结束 14792
            throw new BizException("B10400098", "对不起，首次管理之前遇到管理状态未知异常，不可管理，请联系管理员~~。", false);
        } else if ((batch != null && batch.getSubjectLifeCycle() != null && batch.getSubjectLifeCycle().equals("CURRENTLY_VALID") && !(organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("AUTO_LOCK")) && !(organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("COMMON_LOCK")))) {
            //elseif((1-1-01查询当前最新批次信息.主体生命周期 等于 当前有效 and 1-3-12查询组织的管理状态等.管理锁定状态 不等于 自动锁定 and 1-3-12查询组织的管理状态等.管理锁定状态 不等于 普通锁定))  14783

//异常结束 14791
            throw new BizException("B10400099", "对不起，正式管理前出现管理状态未知异常，不可管理，请联系管理员~。", false);
        } else if ((batch != null && batch.getSubjectLifeCycle() != null && batch.getSubjectLifeCycle().equals("EDITING") && !(organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("UNLOCK")))) {
            //elseif((1-1-01查询当前最新批次信息.主体生命周期 等于 正在编辑 and 1-3-12查询组织的管理状态等.管理锁定状态 不等于 未锁定))  14784

//异常结束 14790
            throw new BizException("B10400100", "对不起，当前正在管理中，出现管理状态异常，不可管理，请联系管理员~~。", false);
        } else if ((listBatch != null && listBatch != null && listBatch.size() == 0)) {
            //elseif(1-1-01查询底层框架服务批次列表.底层框架批次列表数据集条数 等于 0)  14805

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_8 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_4 = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq_4.setMemStartMgtDataCon("FIRST_MANAGE");//sourceId:260465_1_14812

            /*M1-开始管理主条件判断首次管理[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_4.getMemStartMgtDataCon(), "D1-3判断管理模式权限(管理)-M1-开始管理主条件判断首次管理-成员开始管理数据正确主条件不能为空", false);
            receptionServiceRes_8 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_4);


            if ((receptionServiceRes_8 != null && receptionServiceRes_8.getMemStartMgtDataCon() != null && receptionServiceRes_8.getMemStartMgtDataCon().equals("FIRST_MANAGE") && !(organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("UNMANNED_MGT")) && !(organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("AUTO_LOCK")) && !(organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("COMMON_LOCK")))) {
                //if((M1-开始管理主条件判断首次管理.成员开始管理数据正确主条件 等于 首次管理 and 1-3-12查询组织的管理状态等.当前管理对象类型 不等于 无人管理 and 1-3-12查询组织的管理状态等.管理锁定状态 不等于 自动锁定 and 1-3-12查询组织的管理状态等.管理锁定状态 不等于 普通锁定))  14815

//异常结束 14818
                throw new BizException("B10400103", "对不起，不可管理，当前首次管理，但出现异常管理者管理或管理状态异常未知，请联系管理员。~", false);
            }
        } else if ((listBatch != null && listBatch != null && listBatch.size() > 0)) {
            //elseif(1-1-01查询底层框架服务批次列表.底层框架批次列表数据集条数 大于 0)  14806

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_10 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_5 = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq_5.setMemStartMgtDataCon("FOLLOW_MANAGE");//sourceId:260723_1_14813

            /*M1-开始管理主条件判断后续管理[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_5.getMemStartMgtDataCon(), "D1-3判断管理模式权限(管理)-M1-开始管理主条件判断后续管理-成员开始管理数据正确主条件不能为空", false);
            receptionServiceRes_10 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_5);


            if ((receptionServiceRes_10 != null && receptionServiceRes_10.getMemStartMgtDataCon() != null && receptionServiceRes_10.getMemStartMgtDataCon().equals("FOLLOW_MANAGE") && !(organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("UNMANNED_MGT")) && !(organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("AUTO_LOCK")) && !(organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("AUTO_LOCK")) && listBatch != null && listBatch != null && listBatch.size() == 1)) {
                //if((M1-开始管理主条件判断后续管理.成员开始管理数据正确主条件 等于 后续管理 and 1-3-12查询组织的管理状态等.当前管理对象类型 不等于 无人管理 and 1-3-12查询组织的管理状态等.管理锁定状态 不等于 自动锁定 and 1-3-12查询组织的管理状态等.管理锁定状态 不等于 自动锁定 and 1-1-01查询组织ID的底层框架服务批次列表.底层框架批次列表数据集条数 等于 1))  14816

//异常结束 14817
                throw new BizException("B10400102", "对不起，不可管理，当前已经多次管理，出现有异常管理者或管理状态数据未知异常。~", false);
            }
        } else if ((batch != null && batch.getSubjectLifeCycle() != null && batch.getSubjectLifeCycle().equals("EDITING"))) {
            //elseif(1-1-01查询当前最新批次信息.主体生命周期 等于 正在编辑)  14807

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_12 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_6 = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq_6.setMemStartMgtDataCon("CUR_MANAGE");//sourceId:260726_1_14814

            /*M1-开始管理主条件判断管理进行中[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_6.getMemStartMgtDataCon(), "D1-3判断管理模式权限(管理)-M1-开始管理主条件判断管理进行中-成员开始管理数据正确主条件不能为空", false);
            receptionServiceRes_12 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_6);


            if ((receptionServiceRes_12 != null && receptionServiceRes_12.getMemStartMgtDataCon() != null && receptionServiceRes_12.getMemStartMgtDataCon().equals("CUR_MANAGE")) && (!(organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("MEMBER")) || !(organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("UNLOCK")))) {
                //if(M1-开始管理主条件判断管理进行中.成员开始管理数据正确主条件 等于 当前正在管理 and (1-3-12查询组织的管理状态等.当前管理对象类型 不等于 成员 or 1-3-12查询组织的管理状态等.管理锁定状态 不等于 未锁定))  14819

//异常结束 14820
                throw new BizException("B10400101", "对不起，不可管理，当前管理进行中出现管理者异常或管理状态异常~。", false);
            }
        } else {
            //else  14821

//异常结束 14822
            throw new BizException("C00091", "未知错误，请联系管理员~", false);
        }
//processBranchName:正常结束 ,processBranchId:14480

        JudgeMgtPowerRespDto retData = new JudgeMgtPowerRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setEnterMgtPowerType(receptionServiceRes_1.getEnterMgtPowerType());//SimpleFieldAssign//sourceId:173814_1
        }
        if (receptionServiceRes_3 != null) {
            retData.setEnterMgtPowerType(receptionServiceRes_3.getEnterMgtPowerType());//SimpleFieldAssign//sourceId:173814_1
        }
        if (receptionServiceRes_5 != null) {
            retData.setEnterMgtPowerType(receptionServiceRes_5.getEnterMgtPowerType());//SimpleFieldAssign//sourceId:173814_1
        }
        if (receptionServiceRes_7 != null) {
            retData.setEnterMgtPowerType(receptionServiceRes_7.getEnterMgtPowerType());//SimpleFieldAssign//sourceId:173814_1
        }


        return retData;
    }

    /**
     * D1-3查询组织详情(公共)[800]
     * gen by moon at 4/17/2023, 7:20:43 PM
     */
    @Trace(operationName = "D1-3查询组织详情(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryOrgDetailComRespDto queryOrgDetailCom(QueryOrgDetailComReqDto reqDto) {


        Organization organization_1 = null;
//步骤0: 1-3-12查询组织详情 - queryOrgDetail
        Organization organization = null;
        QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
        queryOrgDetailReq.setIsArchive("FALSE");//sourceId:180391_1
        queryOrgDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:132135_1
        if (reqDto != null) {
            queryOrgDetailReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:33892_1
            queryOrgDetailReq.setUsingLockStatus(reqDto.getUsingLockStatus());//SimpleFieldAssign//sourceId:191914_1
        }

        /*1-3-12查询组织详情[201]   */
        Assert.isNull(queryOrgDetailReq.getOrganizationId(), "D1-3查询组织详情(公共)-1-3-12查询组织详情-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailReq.getIsArchive(), "D1-3查询组织详情(公共)-1-3-12查询组织详情-是否存档不能为空", false);
        organization = mOrganizationService.queryOrgDetail(queryOrgDetailReq)/*vcase invoke 本地 method 方法调用;*/;
        Assert.isTrue(organization == null || organization.getOrganizationId() == null, "找不到数据，系统异常", false);

        organization_1 = organization;

        QueryOrgDetailComRespDto retData = new QueryOrgDetailComRespDto();
        if (organization_1 != null) {
            retData.setOrganizationId(organization_1.getOrganizationId());//SimpleFieldAssign//sourceId:160901_1
            retData.setCurrentManageObjectType(organization_1.getCurrentManageObjectType());//SimpleFieldAssign//sourceId:180412_1
            retData.setManageLockStatus(organization_1.getManageLockStatus());//SimpleFieldAssign//sourceId:33947_1
            retData.setUsingLockStatus(organization_1.getUsingLockStatus());//SimpleFieldAssign//sourceId:172549_1
            retData.setReasonOfManageLock(organization_1.getReasonOfManageLock());//SimpleFieldAssign//sourceId:180388_1
            retData.setReasonOfUsingLock(organization_1.getReasonOfUsingLock());//SimpleFieldAssign//sourceId:180389_1
            retData.setGlobalLockStatus(organization_1.getGlobalLockStatus());//SimpleFieldAssign//sourceId:835540_1
            retData.setBatchProcessProgress(organization_1.getBatchProcessProgress());//SimpleFieldAssign//sourceId:261589_1
            retData.setDelBatchIsDone(organization_1.getDelBatchIsDone());//SimpleFieldAssign//sourceId:261590_1
        }


        return retData;
    }

    /**
     * D1-3判断进入部门管理模式权限(管理)[3730]
     * gen by moon at 10/2/2022, 3:48:53 AM
     */
    @Trace(operationName = "D1-3判断进入部门管理模式权限(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public JudgeEnterDeptMgtPowerRespDto judgeEnterDeptMgtPower(JudgeEnterDeptMgtPowerReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_1 = null;
        QueryReceiveFieldDetailRespDto receptionServiceRes_3 = null;
        QueryReceiveFieldDetailRespDto receptionServiceRes_5 = null;
//virtualUsage 1-3-12查询组织详情  11240
        Organization organization = null;
        QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
        queryOrgDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:173942_1_11240
        if (reqDto != null) {
            queryOrgDetailReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:173935_1_11240
        }

        /*1-3-12查询组织详情[201]   */
        Assert.isNull(queryOrgDetailReq.getOrganizationId(), "D1-3判断进入部门管理模式权限(管理)-1-3-12查询组织详情-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailReq.getSpaceId(), "D1-3判断进入部门管理模式权限(管理)-1-3-12查询组织详情-创建于空间ID不能为空", false);
        organization = mOrganizationService.queryOrgDetail(queryOrgDetailReq);


//virtualUsage 1-3-16查询组织架构类型字典列表  14288
        List<TypeDictionary> listTypeDictionary = new ArrayList<>();
        if (organization != null) {
            QueryOrgClassListReq queryOrgClassListReq = new QueryOrgClassListReq();
            queryOrgClassListReq.setPurposeCode("DEPT_TYPE");//sourceId:252848_1_14288
            queryOrgClassListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:252852_1_14288
            queryOrgClassListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:252855_1_14288
            if (organization != null) {
                queryOrgClassListReq.setOrganizationId(organization.getOrganizationId());//SimpleFieldAssign//sourceId:252849_1_14288
            }

            /*1-3-16查询组织架构类型字典列表[295]   */
            Assert.isNull(queryOrgClassListReq.getOrganizationId(), "D1-3判断进入部门管理模式权限(管理)-1-3-16查询组织架构类型字典列表-组织ID不能为空", false);
            Assert.isNull(queryOrgClassListReq.getPurposeCode(), "D1-3判断进入部门管理模式权限(管理)-1-3-16查询组织架构类型字典列表-类型用途编码不能为空", false);
            Assert.isNull(queryOrgClassListReq.getSubjectLifeCycle(), "D1-3判断进入部门管理模式权限(管理)-1-3-16查询组织架构类型字典列表-主体生命周期不能为空", false);
            Assert.isNull(queryOrgClassListReq.getSpaceId(), "D1-3判断进入部门管理模式权限(管理)-1-3-16查询组织架构类型字典列表-创建于空间ID不能为空", false);
            listTypeDictionary = mTypeDictionaryService.queryOrgClassList(queryOrgClassListReq);


        }
        if ((listTypeDictionary != null && listTypeDictionary != null && listTypeDictionary.size() > 0 && organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("UNMANNED_MGT")) && (organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("COMMON_LOCK") || organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("AUTO_LOCK"))) {
            //if((1-3-16查询组织架构类型字典列表.组织架构数据字典列表数据集条数 大于 0 and 1-3-12查询组织详情.当前管理对象类型 等于 无人管理) and (1-3-12查询组织详情.管理锁定状态 等于 普通锁定 or 1-3-12查询组织详情.管理锁定状态 等于 自动锁定))  11242

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq.setDeptEnterMgtPowerType("MANAGE");//sourceId:254718_1_11247

            /*M1-可管理[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq.getDeptEnterMgtPowerType(), "D1-3判断进入部门管理模式权限(管理)-M1-可管理-部门管理权限类型不能为空", false);
            receptionServiceRes = nbOrg.queryReceiveFieldDetail(receptionServiceReq);


            receptionServiceRes_1 = receptionServiceRes;
        } else if ((listTypeDictionary != null && listTypeDictionary != null && listTypeDictionary.size() == 0 || organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("SPEC_LOCK") || organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("MEMBER") || organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("POST_SYSTEM") || organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("ORG_TYPE_DICTIONARY") || organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("POSITION") || organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("STAFFING"))) {
            //elseif((1-3-16查询组织架构类型字典列表.组织架构数据字典列表数据集条数 等于 0 or 1-3-12查询组织详情.管理锁定状态 等于 特权锁定 or 1-3-12查询组织详情.当前管理对象类型 等于 成员 or 1-3-12查询组织详情.当前管理对象类型 等于 岗位体系 or 1-3-12查询组织详情.当前管理对象类型 等于 组织架构数据字典 or 1-3-12查询组织详情.当前管理对象类型 等于 职务 or 1-3-12查询组织详情.当前管理对象类型 等于 编制))  11253

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_2 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_1 = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq_1.setDeptEnterMgtPowerType("MIS_MANAGE");//sourceId:254721_1_11266

            /*M1-不可管理[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_1.getDeptEnterMgtPowerType(), "D1-3判断进入部门管理模式权限(管理)-M1-不可管理-部门管理权限类型不能为空", false);
            receptionServiceRes_2 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_1);


            receptionServiceRes_3 = receptionServiceRes_2;
        } else if ((organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("UNLOCK") && organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("DEPTMENT") && listTypeDictionary != null && listTypeDictionary != null && listTypeDictionary.size() > 0)) {
            //elseif((1-3-12查询组织管理状态等.管理锁定状态 等于 未锁定 and 1-3-12查询组织管理状态等.当前管理对象类型 等于 部门 and 1-3-16查询组织架构类型字典列表.组织架构数据字典列表数据集条数 大于 0))  11270

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_4 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_2 = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq_2.setDeptEnterMgtPowerType("CUR_MANAGE");//sourceId:254727_1_11271

            /*M1-当前正在管理[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_2.getDeptEnterMgtPowerType(), "D1-3判断进入部门管理模式权限(管理)-M1-当前正在管理-部门管理权限类型不能为空", false);
            receptionServiceRes_4 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_2);


            receptionServiceRes_5 = receptionServiceRes_4;
        } else if ((organization != null && organization.getManageLockStatus() == null)) {
            //elseif(1-3-12查询组织管理状态等.管理锁定状态 值等于空 )  14768

//异常结束 14771
            throw new BizException("10300095", "对不起！管理状态未知异常，请联系管理员~", false);
        } else if ((organization != null && organization.getCurrentManageObjectType() == null)) {
            //elseif(1-3-12查询组织管理状态等.当前管理对象类型 值等于空 )  14769

//异常结束 14772
            throw new BizException("10300093", "对不起，当前谁在管理出现未知异常，请联系管理员。~", false);
        } else if ((listTypeDictionary == null)) {
            //elseif(1-3-16查询组织架构类型字典列表.出参 值等于空 )  14770

//异常结束 14773
            throw new BizException("10300094", "对不起，组织架构分类未知异常，请联系管理员~", false);
        } else if ((organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("UNMANNED_MGT"))) {
            //elseif(1-3-12查询组织详情.当前管理对象类型 等于 无人管理)  14823

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_6 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_3 = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq_3.setDeptStartMgtDataCon("MANAGE");//sourceId:261060_1_14826

            /*M1-部门开始管理判断为可管理[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_3.getDeptStartMgtDataCon(), "D1-3判断进入部门管理模式权限(管理)-M1-部门开始管理判断为可管理-部门开始管理数据正确主条件不能为空", false);
            receptionServiceRes_6 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_3);


            if ((receptionServiceRes_6 != null && receptionServiceRes_6.getDeptStartMgtDataCon() != null && receptionServiceRes_6.getDeptStartMgtDataCon().equals("MANAGE") && !(organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("AUTO_LOCK")) && !(organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("COMMON_LOCK")))) {
                //if((M1-部门开始管理判断为可管理.部门开始管理数据正确主条件 等于 可管理 and 1-3-12查询组织管理状态等.管理锁定状态 不等于 自动锁定 and 1-3-12查询组织管理状态等.管理锁定状态 不等于 普通锁定))  14829

//异常结束 14830
                throw new BizException("B10400104", "对不起，不可管理，当前可以管理，但是管理状态未知异常，请联系管理员~。", false);
            }
        } else if ((organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("DEPTMENT"))) {
            //elseif(1-3-12查询组织管理状态等.当前管理对象类型 等于 部门)  14824

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_8 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_4 = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq_4.setDeptStartMgtDataCon("CUR_MANAGE");//sourceId:261062_1_14827

            /*M1-部门开始管理判断为当前正在管理[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_4.getDeptStartMgtDataCon(), "D1-3判断进入部门管理模式权限(管理)-M1-部门开始管理判断为当前正在管理-部门开始管理数据正确主条件不能为空", false);
            receptionServiceRes_8 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_4);


            if ((receptionServiceRes_8 != null && receptionServiceRes_8.getDeptStartMgtDataCon() != null && receptionServiceRes_8.getDeptStartMgtDataCon().equals("CUR_MANAGE") && !(organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("UNLOCK")))) {
                //if((M1-部门开始管理判断为当前正在管理.部门开始管理数据正确主条件 等于 当前正在管理 and 1-3-12查询组织管理状态等.管理锁定状态 不等于 未锁定))  14831

//异常结束 14832
                throw new BizException("B10400105", "对不起，不可管理，当前管理进行中但管理状态出现未知异常，请联系管理员~。", false);
            }
        } else if ((!(organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("DEPTMENT")) && !(organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("UNMANNED_MGT")))) {
            //elseif((1-3-12查询组织详情.当前管理对象类型 不等于 部门 and 1-3-12查询组织详情.当前管理对象类型 不等于 无人管理))  14825

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_10 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_5 = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq_5.setDeptStartMgtDataCon("MIS_MANAGE");//sourceId:261064_1_14828

            /*M1-部门开始管理判断为不可管理[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_5.getDeptStartMgtDataCon(), "D1-3判断进入部门管理模式权限(管理)-M1-部门开始管理判断为不可管理-部门开始管理数据正确主条件不能为空", false);
            receptionServiceRes_10 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_5);


            if ((receptionServiceRes_10 != null && receptionServiceRes_10.getDeptStartMgtDataCon() != null && receptionServiceRes_10.getDeptStartMgtDataCon().equals("MIS_MANAGE")) && (organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("COMMON_LOCK") || organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("AUTO_LOCK"))) {
                //if(M1-部门开始管理判断为不可管理.部门开始管理数据正确主条件 等于 不可管理 and (1-3-12查询组织详情.管理锁定状态 等于 普通锁定 or 1-3-12查询组织详情.管理锁定状态 等于 自动锁定))  14833

//异常结束 14834
                throw new BizException("B10400106", "对不起，不可管理，当前不可管理，管理状态未知异常，请联系管理员~。", false);
            }
        } else {
            //else  14774

//异常结束 14775
            throw new BizException("C00091", "未知错误，请联系管理员~", false);
        }
//processBranchName:正常结束 ,processBranchId:14365

        JudgeEnterDeptMgtPowerRespDto retData = new JudgeEnterDeptMgtPowerRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setDeptEnterMgtPowerType(receptionServiceRes_1.getDeptEnterMgtPowerType());//SimpleFieldAssign//sourceId:254733_1
        }
        if (receptionServiceRes_3 != null) {
            retData.setDeptEnterMgtPowerType(receptionServiceRes_3.getDeptEnterMgtPowerType());//SimpleFieldAssign//sourceId:254733_1
        }
        if (receptionServiceRes_5 != null) {
            retData.setDeptEnterMgtPowerType(receptionServiceRes_5.getDeptEnterMgtPowerType());//SimpleFieldAssign//sourceId:254733_1
        }


        return retData;
    }

    /**
     * D1-3查询最高组织详情[4148]
     * gen by moon at 10/2/2022, 5:30:10 AM
     */
    @Trace(operationName = "D1-3查询最高组织详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySupremeOrgDetailRespDto querySupremeOrgDetail(QuerySupremeOrgDetailReqDto reqDto) {


        Organization organization_1 = null;
//步骤0: 1-3-12查询组织详情 - queryOrgDetail
        Organization organization = null;
        QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
        queryOrgDetailReq.setIsHighOrg("TRUE");//sourceId:244808_1
        queryOrgDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:244823_1
        queryOrgDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:244809_1

        /*1-3-12查询组织详情[201]   */
        Assert.isNull(queryOrgDetailReq.getIsHighOrg(), "D1-3查询最高组织详情-1-3-12查询组织详情-是否最高组织不能为空", false);
        Assert.isNull(queryOrgDetailReq.getSubjectLifeCycle(), "D1-3查询最高组织详情-1-3-12查询组织详情-主体生命周期不能为空", false);
        Assert.isNull(queryOrgDetailReq.getSpaceId(), "D1-3查询最高组织详情-1-3-12查询组织详情-创建于空间ID不能为空", false);
        organization = mOrganizationService.queryOrgDetail(queryOrgDetailReq);


        organization_1 = organization;

        QuerySupremeOrgDetailRespDto retData = new QuerySupremeOrgDetailRespDto();
        if (organization_1 != null) {
            retData.setOrganizationId(organization_1.getOrganizationId());//SimpleFieldAssign//sourceId:244825_1
            retData.setOrganizationName(organization_1.getOrganizationName());//SimpleFieldAssign//sourceId:247088_1
        }


        return retData;
    }

    /**
     * D1-3批量查部门(公共)(边界)[2568]
     * gen by moon at 11/2/2023, 10:07:06 PM
     */
    @Trace(operationName = "D1-3批量查部门(公共)(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public BatchQueryDeptComBorderRespDto batchQueryDeptComBorder(BatchQueryDeptComBorderReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
        List<TypeDictionary> listTypeDictionary_1 = new ArrayList<>();
        if ((reqDto != null && reqDto.getDeptList() != null && reqDto.getDeptList().size() > 0)) {
            //if(D1-3批量查部门(公共)(边界).部门列表数据集条数 大于 0)  27361

            List<Dept> listDept = new ArrayList<>();
            BatchQueryDeptListReq batchQueryDeptListReq = new BatchQueryDeptListReq();
            batchQueryDeptListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:85616_1_27362
            if (reqDto != null) {
                batchQueryDeptListReq.setDeptList(reqDto.getDeptList());//list-field-assign//sourceId:79461_1_27362
                batchQueryDeptListReq.setLevelNumber(reqDto.getLevelNumber());//SimpleFieldAssign//sourceId:857470_1_27362
            }

            /*1-3-09批量查询部门列表[1153]   */
            Assert.isNull(batchQueryDeptListReq.getSpaceId(), "D1-3批量查部门(公共)(边界)-1-3-09批量查询部门列表-创建于空间ID不能为空", false);
            listDept = mDeptService.batchQueryDeptList(batchQueryDeptListReq)/*vcase invoke 本地 method 方法调用;*/;


            listDept_1 = listDept;
            List<TypeDictionary> listTypeDictionary = new ArrayList<>();
            BatchQueryOrgClassListReq batchQueryOrgClassListReq = new BatchQueryOrgClassListReq();
            if (listDept != null && !CollectionUtil.isEmpty(listDept) && listDept != null && !CollectionUtil.isEmpty(listDept)) {
                batchQueryOrgClassListReq.setOrgClassList(listDept.stream().map(item -> item.getTypeDictionaryId())
                        .collect(Collectors.toList()));/*list-to-strings*///sourceId:1210563_1_51596
            }

            /*1-3-16批量查询组织架构类型字典列表	[1150]   */

            listTypeDictionary = mTypeDictionaryService.batchQueryOrgClassList(batchQueryOrgClassListReq)/*vcase invoke 本地 method 方法调用;*/;


            listTypeDictionary_1 = listTypeDictionary;
        }
        BatchQueryDeptComBorderRespDto retData = new BatchQueryDeptComBorderRespDto();
        //数据集融合  MoreListToOneSource
        if (listDept_1 != null && !CollectionUtil.isEmpty(listDept_1) && !CollectionUtil.isEmpty(listDept_1)) {
            for (Dept dept : listDept_1) {
                DeptDto retElm = new DeptDto();
                retElm.setDeptId(dept.getDeptId());//SimpleFieldAssign//sourceId:44646_2
                retElm.setDeptShortName(dept.getDeptShortName());//SimpleFieldAssign//sourceId:44647_2
                retElm.setLevelNumber(dept.getLevelNumber());//SimpleFieldAssign//sourceId:110759_2
                retElm.setTypeDictionaryId(dept.getTypeDictionaryId());//SimpleFieldAssign//sourceId:249815_2
                retElm.setRoleMemberId(dept.getRoleMemberId());//SimpleFieldAssign//sourceId:53868_2
                retElm.setDirectorIdCardName(dept.getDirectorIdCardName());//SimpleFieldAssign//sourceId:54247_2
                retElm.setPartyAndYouthDirectorIdCardName(dept.getPartyAndYouthDirectorIdCardName());//SimpleFieldAssign//sourceId:235516_2
                retElm.setOrderNumber(dept.getOrderNumber());//SimpleFieldAssign//sourceId:248811_2
                retData.getDeptList().add(retElm);
                if (listTypeDictionary_1 != null && !CollectionUtil.isEmpty(listTypeDictionary_1)) {
                    for (TypeDictionary typeDictionary : listTypeDictionary_1) {
                        if (typeDictionary.getTypeDictionaryId().equals(dept.getTypeDictionaryId())) {
                            retElm.setTypeDictionaryName(typeDictionary.getTypeDictionaryName());//SimpleFieldAssign//sourceId:249814_2
                        }
                    }
                }

            }
        }//sourceId:79487_1


        return retData;
    }

    /**
     * D1-3更新组织管理检查项状态等[4158]
     * gen by moon at 10/2/2022, 5:40:16 AM
     */
    @Trace(operationName = "D1-3更新组织管理检查项状态等")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public RefreshOrgMgtCheckItemEtcRespDto refreshOrgMgtCheckItemEtc(RefreshOrgMgtCheckItemEtcReqDto reqDto) {


        //virtualUsage 1-3-12查询组织详情  14290
        Organization organization = null;
        QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
        queryOrgDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:255094_1_14290
        if (reqDto != null) {
            queryOrgDetailReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:252925_1_14290
        }

        /*1-3-12查询组织详情[201]   */
        Assert.isNull(queryOrgDetailReq.getOrganizationId(), "D1-3更新组织管理检查项状态等-1-3-12查询组织详情-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailReq.getSubjectLifeCycle(), "D1-3更新组织管理检查项状态等-1-3-12查询组织详情-主体生命周期不能为空", false);
        organization = mOrganizationService.queryOrgDetail(queryOrgDetailReq);
        Assert.isTrue(organization == null || organization.getOrganizationId() == null, "返回值不能为空", false);


//virtualUsage 1-3-16查询组织架构类型字典列表  14445
        List<TypeDictionary> listTypeDictionary = new ArrayList<>();
        if (organization != null) {
            QueryOrgClassListReq queryOrgClassListReq = new QueryOrgClassListReq();
            queryOrgClassListReq.setPurposeCode("DEPT_TYPE");//sourceId:255174_1_14445
            queryOrgClassListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:255178_1_14445
            queryOrgClassListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:255181_1_14445
            if (organization != null) {
                queryOrgClassListReq.setOrganizationId(organization.getOrganizationId());//SimpleFieldAssign//sourceId:255175_1_14445
            }

            /*1-3-16查询组织架构类型字典列表[295]   */
            Assert.isNull(queryOrgClassListReq.getOrganizationId(), "D1-3更新组织管理检查项状态等-1-3-16查询组织架构类型字典列表-组织ID不能为空", false);
            Assert.isNull(queryOrgClassListReq.getPurposeCode(), "D1-3更新组织管理检查项状态等-1-3-16查询组织架构类型字典列表-类型用途编码不能为空", false);
            Assert.isNull(queryOrgClassListReq.getSubjectLifeCycle(), "D1-3更新组织管理检查项状态等-1-3-16查询组织架构类型字典列表-主体生命周期不能为空", false);
            Assert.isNull(queryOrgClassListReq.getSpaceId(), "D1-3更新组织管理检查项状态等-1-3-16查询组织架构类型字典列表-创建于空间ID不能为空", false);
            listTypeDictionary = mTypeDictionaryService.queryOrgClassList(queryOrgClassListReq);


        }
//virtualUsage 1-3-09查询部门列表（用于判断部门维护完成是否可用）  15318
        List<Dept> listDept = new ArrayList<>();
        if (organization != null) {
            QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
            queryDeptListReq.setSubjectLifeCycle("EDITING");//sourceId:286508_1_15318
            if (organization != null) {
                queryDeptListReq.setOrganizationId(organization.getOrganizationId());//SimpleFieldAssign//sourceId:286506_1_15318
            }

            /*1-3-09查询部门列表（用于判断部门维护完成是否可用）[217]   */
            Assert.isNull(queryDeptListReq.getOrganizationId(), "D1-3更新组织管理检查项状态等-1-3-09查询部门列表（用于判断部门维护完成是否可用）-组织ID不能为空", false);
            Assert.isNull(queryDeptListReq.getSubjectLifeCycle(), "D1-3更新组织管理检查项状态等-1-3-09查询部门列表（用于判断部门维护完成是否可用）-主体生命周期不能为空", false);
            listDept = mDeptService.queryDeptList(queryDeptListReq);


        }
        if ((listTypeDictionary != null && listTypeDictionary != null && listTypeDictionary.size() > 0 && organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("DEPTMENT") && organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("UNLOCK") && listDept != null && listDept != null && listDept.size() == 0)) {
            //if((1-3-16查询组织架构类型字典列表.组织架构数据字典列表数据集条数 大于 0 and 1-3-12查询组织详情.当前管理对象类型 等于 部门 and 1-3-12查询组织详情.管理锁定状态 等于 未锁定 and 1-3-09查询部门列表（用于判断部门维护完成是否可用）.部门列表数据集条数 等于 0))  14291

            boolean bOOLEAN;
            if (organization != null) {
                Organization organization_2 = new Organization();
                organization_2.setCurrentManageObjectType("UNMANNED_MGT");//sourceId:252976_1_14292
                organization_2.setManageLockStatus("AUTO_LOCK");//sourceId:252971_1_14292
                organization_2.setReasonOfManageLock("组织架构成员已确认设置完成，锁定停止维护。");//CUSTOM_CONVENTION//sourceId:252972_1_14292
                organization_2.setUsingLockStatus("UNLOCK");//sourceId:252974_1_14292
                organization_2.setReasonOfUsingLock("---");//NULL//sourceId:252973_1_14292
                if (organization != null) {
                    organization_2.setOrganizationId(organization.getOrganizationId());//SimpleFieldAssign//sourceId:252968_1_14292
                }

                /*1-3-12修改组织[197]   */
                Assert.isNull(organization_2.getOrganizationId(), "D1-3更新组织管理检查项状态等-1-3-12修改组织-组织ID不能为空", false);
                Assert.isNull(organization_2.getCurrentManageObjectType(), "D1-3更新组织管理检查项状态等-1-3-12修改组织-当前管理对象类型不能为空", false);
                Assert.isNull(organization_2.getManageLockStatus(), "D1-3更新组织管理检查项状态等-1-3-12修改组织-管理锁定状态不能为空", false);
                Assert.isNull(organization_2.getReasonOfManageLock(), "D1-3更新组织管理检查项状态等-1-3-12修改组织-管理锁定原因不能为空", false);
                Assert.isNull(organization_2.getUsingLockStatus(), "D1-3更新组织管理检查项状态等-1-3-12修改组织-使用锁定状态不能为空", false);
                bOOLEAN = mOrganizationService.updateOrg(organization_2);


            }
            StatusCheckItem statusCheckItem = null;
            if (organization != null) {
                QueryCheckItemStatDetailReq queryCheckItemStatDetailReq = new QueryCheckItemStatDetailReq();
                queryCheckItemStatDetailReq.setObjectTypeCode("ORG_CHECK");//sourceId:252948_1_14293
                queryCheckItemStatDetailReq.setCheckItemCode("ORG_MGT_CHECK");//CUSTOM_CONVENTION//sourceId:252947_1_14293
                if (organization != null) {
                    queryCheckItemStatDetailReq.setEntityId(organization.getOrganizationId());//SimpleFieldAssign//sourceId:252949_1_14293
                }

                /*1-1-22查询状态校验项详情[327]   */
                Assert.isNull(queryCheckItemStatDetailReq.getEntityId(), "D1-3更新组织管理检查项状态等-1-1-22查询状态校验项详情-内容对象实例ID不能为空", false);
                Assert.isNull(queryCheckItemStatDetailReq.getObjectTypeCode(), "D1-3更新组织管理检查项状态等-1-1-22查询状态校验项详情-内容对象类型编码不能为空", false);
                Assert.isNull(queryCheckItemStatDetailReq.getCheckItemCode(), "D1-3更新组织管理检查项状态等-1-1-22查询状态校验项详情-检查项标识不能为空", false);
                statusCheckItem = mStatusCheckItemService.queryCheckItemStatDetail(queryCheckItemStatDetailReq);
                Assert.isTrue(statusCheckItem == null || statusCheckItem.getStatusCheckItemId() == null, "返回值不能为空", false);


            }
            if ((statusCheckItem != null && statusCheckItem.getIsComplete() != null && statusCheckItem.getIsComplete().equals("FALSE"))) {
                //if(1-1-22查询状态校验项详情.是否已完成 等于 否)  14294

                boolean bOOLEAN_1;
                if (statusCheckItem != null) {
                    StatusCheckItem statusCheckItem_2 = new StatusCheckItem();
                    statusCheckItem_2.setIsComplete("TRUE");//sourceId:252965_1_14295
                    if (statusCheckItem != null) {
                        statusCheckItem_2.setStatusCheckItemId(statusCheckItem.getStatusCheckItemId());//SimpleFieldAssign//sourceId:252961_1_14295
                    }

                    /*1-1-22修改状态校验项	[325]   */
                    Assert.isNull(statusCheckItem_2.getStatusCheckItemId(), "D1-3更新组织管理检查项状态等-1-1-22修改状态校验项	-状态校验项ID不能为空", false);
                    Assert.isNull(statusCheckItem_2.getIsComplete(), "D1-3更新组织管理检查项状态等-1-1-22修改状态校验项	-是否已完成不能为空", false);
                    bOOLEAN_1 = mStatusCheckItemService.updateCheckItemStat(statusCheckItem_2);


                }
//processBranchName:正常结束 ,processBranchId:14296

            } else {
                //else  14297

//异常结束 14298
                throw new BizException("C00029", "对不起，异常错误，不可操作～！", false);
            }
        } else {
            //else  14299

//异常结束 14300
            throw new BizException("C00029", "对不起，异常错误，不可操作～！", false);
        }
        RefreshOrgMgtCheckItemEtcRespDto retData = new RefreshOrgMgtCheckItemEtcRespDto();


        return retData;
    }

    /**
     * D1-3查询直属一级部门(公共)[3757]
     * gen by moon at 9/14/2022, 12:17:03 AM
     */
    @Trace(operationName = "D1-3查询直属一级部门(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDirectlyUnderOneLevelDeptDetailComRespDto queryDirectlyUnderOneLevelDeptDetailCom(QueryDirectlyUnderOneLevelDeptDetailComReqDto reqDto) {


        Dept dept_1 = null;
        Dept dept_3 = null;
//virtualUsage 1-3-09查询当前部门  11489
        Dept dept = null;
        QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
        queryDeptDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:177194_1_11489
        if (reqDto != null) {
            queryDeptDetailReq.setOrganizationId(reqDto.getOrganizationId());//sourceId:177200_1_11489
            queryDeptDetailReq.setDeptId(reqDto.getDeptId());//sourceId:177172_1_11489
        }

        /*1-3-09查询当前部门[218]   */
        Assert.isNull(queryDeptDetailReq.getOrganizationId(), "D1-3查询直属一级部门(公共)-1-3-09查询当前部门-组织ID不能为空", false);
        Assert.isNull(queryDeptDetailReq.getDeptId(), "D1-3查询直属一级部门(公共)-1-3-09查询当前部门-部门ID不能为空", false);
        Assert.isNull(queryDeptDetailReq.getSubjectLifeCycle(), "D1-3查询直属一级部门(公共)-1-3-09查询当前部门-主体生命周期不能为空", false);
        dept = mDeptService.queryDeptDetail(queryDeptDetailReq);
        Assert.isTrue(dept == null || dept.getDeptId() == null, "返回值不能为空", false);

        dept_1 = dept;
        if ((dept != null && dept.getLevelNumber() > 1)) {
            //if(1-3-09查询当前部门.层级 大于 1)  11493

//ModelCode: findLevelCode
            QueryLookAncestorNodeDetailRespDto findLevelCodeRes = null;
            if (dept != null) {
                QueryLookAncestorNodeDetailReqDto findLevelCodeReq = new QueryLookAncestorNodeDetailReqDto();
                findLevelCodeReq.setToLevelNumber(1L);//CUSTOM_CONVENTION//sourceId:177276_1_11497
                if (dept != null) {
                    findLevelCodeReq.setDeptCode(dept.getDeptCode());//sourceId:177273_1_11497
                    findLevelCodeReq.setLevelNumber(dept.getLevelNumber());//sourceId:177274_1_11497
                }

                /*M-查找祖先(特殊方法）[2202]  通过标识、层级找1级，2级..X级的的CODE */
                Assert.isNull(findLevelCodeReq.getDeptCode(), "D1-3查询直属一级部门(公共)-M-查找祖先(特殊方法）-部门标识不能为空", false);
                Assert.isNull(findLevelCodeReq.getLevelNumber(), "D1-3查询直属一级部门(公共)-M-查找祖先(特殊方法）-层级不能为空", false);
                Assert.isNull(findLevelCodeReq.getToLevelNumber(), "D1-3查询直属一级部门(公共)-M-查找祖先(特殊方法）-目标层级不能为空", false);
                findLevelCodeRes = nbOrg.queryLookAncestorNodeDetail(findLevelCodeReq);


            }
            Dept dept_2 = null;
            QueryDeptDetailReq queryDeptDetailReq_1 = new QueryDeptDetailReq();
            queryDeptDetailReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:177224_1_11494
            if (reqDto != null) {
                queryDeptDetailReq_1.setOrganizationId(reqDto.getOrganizationId());//sourceId:177230_1_11494
            }
            if (findLevelCodeRes != null) {
                queryDeptDetailReq_1.setDeptCode(findLevelCodeRes.getDeptCode());//sourceId:177277_1_11494
            }

            /*1-3-09查询上级部门[218]   */
            Assert.isNull(queryDeptDetailReq_1.getOrganizationId(), "D1-3查询直属一级部门(公共)-1-3-09查询上级部门-组织ID不能为空", false);
            Assert.isNull(queryDeptDetailReq_1.getDeptCode(), "D1-3查询直属一级部门(公共)-1-3-09查询上级部门-部门标识不能为空", false);
            Assert.isNull(queryDeptDetailReq_1.getSubjectLifeCycle(), "D1-3查询直属一级部门(公共)-1-3-09查询上级部门-主体生命周期不能为空", false);
            dept_2 = mDeptService.queryDeptDetail(queryDeptDetailReq_1);
            Assert.isTrue(dept_2 == null || dept_2.getDeptId() == null, "返回值不能为空", false);

            dept_3 = dept_2;
//processBranchName:正常结束 ,processBranchId:11498

        } else {
            //else  11495

//processBranchName:正常结束 ,processBranchId:11496

        }
        QueryDirectlyUnderOneLevelDeptDetailComRespDto retData = new QueryDirectlyUnderOneLevelDeptDetailComRespDto();
        if (dept_1 != null) {
            retData.setDeptId(dept_1.getDeptId());//sourceId:177278_1
        }
        if (dept_3 != null) {
            retData.setDeptId(dept_3.getDeptId());//sourceId:177278_1
        }


        return retData;
    }

    /**
     * D1-3批量查询部门列表	[1182]
     * gen by moon at 11/1/2022, 7:47:38 AM
     */
    @Trace(operationName = "D1-3批量查询部门列表	")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public BatchQueryDeptListRespDto batchQueryDeptList(BatchQueryDeptListReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//步骤0: 1-3-09批量查询部门列表 - batchQueryDeptList
        List<Dept> listDept = new ArrayList<>();
        BatchQueryDeptListReq batchQueryDeptListReq = new BatchQueryDeptListReq();
        batchQueryDeptListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:114295_1
        batchQueryDeptListReq.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID//sourceId:114296_1
        if (reqDto != null) {
            batchQueryDeptListReq.setDeptList(reqDto.getDeptList());//list-field-assign//sourceId:26649_1
            batchQueryDeptListReq.setLevelNumber(reqDto.getLevelNumber());//SimpleFieldAssign//sourceId:379256_1
            batchQueryDeptListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:114294_1
        }

        /*1-3-09批量查询部门列表[1153]   */
        Assert.isNull(batchQueryDeptListReq.getAppId(), "D1-3批量查询部门列表	-1-3-09批量查询部门列表-创建于联盟应用ID不能为空", false);
        listDept = mDeptService.batchQueryDeptList(batchQueryDeptListReq);


        listDept_1 = listDept;

        BatchQueryDeptListRespDto retData = new BatchQueryDeptListRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:26697_1


        return retData;
    }

    /**
     * D1-3查询部门详情(公共)(边界)[2691]
     * gen by moon at 12/18/2023, 9:20:33 PM
     */
    @Trace(operationName = "D1-3查询部门详情(公共)(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptDetailComBorderRespDto queryDeptDetailComBorder(QueryDeptDetailComBorderReqDto reqDto) {


        Dept dept_1 = null;
//步骤0: 1-3-09查询部门详情 - queryDeptDetail
        Dept dept = null;
        QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
        if (reqDto != null) {
            queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:83879_1
            queryDeptDetailReq.setDeptCode(reqDto.getDeptCode());//SimpleFieldAssign//sourceId:230127_1
            queryDeptDetailReq.setParentDeptId(reqDto.getParentDeptId());//SimpleFieldAssign//sourceId:1427902_1
            queryDeptDetailReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1427904_1
        }

        /*1-3-09查询部门详情[218]   */

        dept = mDeptService.queryDeptDetail(queryDeptDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        dept_1 = dept;

        QueryDeptDetailComBorderRespDto retData = new QueryDeptDetailComBorderRespDto();
        if (dept_1 != null) {
            retData.setDeptId(dept_1.getDeptId());//SimpleFieldAssign//sourceId:83920_1
            retData.setDeptCode(dept_1.getDeptCode());//SimpleFieldAssign//sourceId:218805_1
            retData.setDeptShortName(dept_1.getDeptShortName());//SimpleFieldAssign//sourceId:83921_1
            retData.setParentDeptId(dept_1.getParentDeptId());//SimpleFieldAssign//sourceId:329736_1
            retData.setOrganizationId(dept_1.getOrganizationId());//SimpleFieldAssign//sourceId:1364977_1
            retData.setLevelNumber(dept_1.getLevelNumber());//SimpleFieldAssign//sourceId:333023_1
            retData.setRoleMemberId(dept_1.getRoleMemberId());//SimpleFieldAssign//sourceId:408187_1
            retData.setDirectorIdCardName(dept_1.getDirectorIdCardName());//SimpleFieldAssign//sourceId:408188_1
            retData.setPartyAndYouthDirectorIdCardName(dept_1.getPartyAndYouthDirectorIdCardName());//SimpleFieldAssign//sourceId:1128911_1
            retData.setTypeDictionaryId(dept_1.getTypeDictionaryId());//SimpleFieldAssign//sourceId:885648_1
            retData.setSpaceId(dept_1.getSpaceId());//SimpleFieldAssign//sourceId:1365044_1
        }


        return retData;
    }

    /**
     * D1查询一级部门权限管理入口[4165]
     * gen by moon at 10/2/2022, 5:50:21 AM
     */
    @Trace(operationName = "D1查询一级部门权限管理入口")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryFirstDeptPowerManagePortalDetailRespDto queryFirstDeptPowerManagePortalDetail(QueryFirstDeptPowerManagePortalDetailReqDto reqDto) {


        Dept dept_3 = null;
        Dept dept_7 = null;
        if ((reqDto != null && reqDto.getDeptId() == null && reqDto != null && reqDto.getInductionUnitTypeCode() != null && reqDto.getInductionUnitTypeCode().equals("DEPT"))) {
            //if((D1查询一级部门权限管理入口.部门ID 值等于空  and D1查询一级部门权限管理入口.就职单位类型实例 等于 部门))  14367

            InductionRecord inductionRecord = null;
            QueryinductionRecordDetailReq queryinductionRecordDetailReq = new QueryinductionRecordDetailReq();
            queryinductionRecordDetailReq.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:254935_1_14379
            queryinductionRecordDetailReq.setInductionUnitTypeCode("DEPT");//sourceId:254936_1_14379
            queryinductionRecordDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:254938_1_14379

            /*1-3-13查询是否有部门下就职记录[165]   */
            Assert.isNull(queryinductionRecordDetailReq.getOriginalRoleMemberId(), "D1查询一级部门权限管理入口-1-3-13查询是否有部门下就职记录-身份人员ID不能为空", false);
            Assert.isNull(queryinductionRecordDetailReq.getInductionUnitTypeCode(), "D1查询一级部门权限管理入口-1-3-13查询是否有部门下就职记录-就职单位类型实例不能为空", false);
            Assert.isNull(queryinductionRecordDetailReq.getSpaceId(), "D1查询一级部门权限管理入口-1-3-13查询是否有部门下就职记录-创建于空间ID不能为空", false);
            inductionRecord = mInductionRecordService.queryinductionRecordDetail(queryinductionRecordDetailReq);


            if ((inductionRecord == null)) {
                //if(1-3-13查询是否有部门下就职记录.出参 值等于空 )  14380

//processBranchName:正常结束 ,processBranchId:14391

            } else {
                //else  14389

//异常结束 14392
                throw new BizException("500", "系统异常，请联系管理员！", false);
            }
        } else if ((reqDto != null && reqDto.getDeptId() != null)) {
            //elseif(D1查询一级部门权限管理入口.部门ID 值不等于空 )  14369

            if ((reqDto != null && reqDto.getInductionUnitTypeCode() != null && reqDto.getInductionUnitTypeCode().equals("DEPT"))) {
                //if(D1查询一级部门权限管理入口.就职单位类型实例 等于 部门)  14395

                Dept dept = null;
                QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
                if (reqDto != null) {
                    queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:254719_1_14396
                }

                /*1-3-09查询部门层或部门ID[218]   */
                Assert.isNull(queryDeptDetailReq.getDeptId(), "D1查询一级部门权限管理入口-1-3-09查询部门层或部门ID-部门ID不能为空", false);
                dept = mDeptService.queryDeptDetail(queryDeptDetailReq);
                Assert.isTrue(dept == null || dept.getDeptId() == null, "返回值不能为空", false);


                if ((dept != null && dept.getLevelNumber() == 1L)) {
                    //if(1-3-09查询部门层级.层级 等于 1)  14399

                    ManagedDept managedDept = null;
                    if (dept != null) {
                        QueryManageDeptDetailReq queryManageDeptDetailReq = new QueryManageDeptDetailReq();
                        queryManageDeptDetailReq.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:254823_1_14635
                        queryManageDeptDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:254825_1_14635
                        if (dept != null) {
                            queryManageDeptDetailReq.setDeptId(dept.getDeptId());//SimpleFieldAssign//sourceId:254821_1_14635
                        }

                        /*1-2-14查询管理的部门详情[1087]   */
                        Assert.isNull(queryManageDeptDetailReq.getDeptId(), "D1查询一级部门权限管理入口-1-2-14查询管理的部门详情-部门ID不能为空", false);
                        Assert.isNull(queryManageDeptDetailReq.getOriginalRoleMemberId(), "D1查询一级部门权限管理入口-1-2-14查询管理的部门详情-身份人员ID不能为空", false);
                        Assert.isNull(queryManageDeptDetailReq.getSpaceId(), "D1查询一级部门权限管理入口-1-2-14查询管理的部门详情-创建于空间ID不能为空", false);
                        managedDept = mManagedDeptService.queryManageDeptDetail(queryManageDeptDetailReq);


                    }
                    if ((managedDept != null)) {
                        //if(1-2-14查询管理的部门详情.出参 值不等于空 )  14638

                        Dept dept_2 = null;
                        if (managedDept != null) {
                            QueryDeptDetailReq queryDeptDetailReq_1 = new QueryDeptDetailReq();
                            queryDeptDetailReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:258858_1_14639
                            if (managedDept != null) {
                                queryDeptDetailReq_1.setDeptId(managedDept.getDeptId());//SimpleFieldAssign//sourceId:258857_1_14639
                            }

                            /*1-3-09查询层级一判断管理的一级部门[218]   */
                            Assert.isNull(queryDeptDetailReq_1.getDeptId(), "D1查询一级部门权限管理入口-1-3-09查询层级一判断管理的一级部门-部门ID不能为空", false);
                            Assert.isNull(queryDeptDetailReq_1.getSubjectLifeCycle(), "D1查询一级部门权限管理入口-1-3-09查询层级一判断管理的一级部门-主体生命周期不能为空", false);
                            dept_2 = mDeptService.queryDeptDetail(queryDeptDetailReq_1);
                            Assert.isTrue(dept_2 == null || dept_2.getDeptId() == null, "返回值不能为空", false);

                            dept_3 = dept_2;
                        }
//processBranchName:正常结束 ,processBranchId:14640

                    }
                } else if ((dept != null && dept.getLevelNumber() > 1L)) {
                    //elseif(1-3-09查询部门层级.层级 大于 1)  14402

//ModelCode: findLevelCode
                    QueryLookAncestorNodeDetailRespDto findLevelCodeRes = null;
                    if (dept != null) {
                        QueryLookAncestorNodeDetailReqDto findLevelCodeReq = new QueryLookAncestorNodeDetailReqDto();
                        findLevelCodeReq.setToLevelNumber(1L);//CUSTOM_CONVENTION//sourceId:254732_1_14403
                        if (dept != null) {
                            findLevelCodeReq.setDeptCode(dept.getDeptCode());//SimpleFieldAssign//sourceId:254729_1_14403
                            findLevelCodeReq.setLevelNumber(dept.getLevelNumber());//SimpleFieldAssign//sourceId:254730_1_14403
                        }

                        /*M-查找指定层级祖先(特殊方法）[2202]  通过标识、层级找1级，2级..X级的的CODE */
                        Assert.isNull(findLevelCodeReq.getDeptCode(), "D1查询一级部门权限管理入口-M-查找指定层级祖先(特殊方法）-部门标识不能为空", false);
                        Assert.isNull(findLevelCodeReq.getLevelNumber(), "D1查询一级部门权限管理入口-M-查找指定层级祖先(特殊方法）-层级不能为空", false);
                        Assert.isNull(findLevelCodeReq.getToLevelNumber(), "D1查询一级部门权限管理入口-M-查找指定层级祖先(特殊方法）-目标层级不能为空", false);
                        findLevelCodeRes = nbOrg.queryLookAncestorNodeDetail(findLevelCodeReq);
                        Assert.isTrue(findLevelCodeRes == null || findLevelCodeRes.getDeptCode() == null, "返回值不能为空", false);


                    }
                    Dept dept_4 = null;
                    QueryDeptDetailReq queryDeptDetailReq_2 = new QueryDeptDetailReq();
                    if (findLevelCodeRes != null) {
                        queryDeptDetailReq_2.setDeptCode(findLevelCodeRes.getDeptCode());//SimpleFieldAssign//sourceId:254768_1_14404
                    }

                    /*1-3-09查询层级大于一找到祖先一级部门ID[218]   */
                    Assert.isNull(queryDeptDetailReq_2.getDeptCode(), "D1查询一级部门权限管理入口-1-3-09查询层级大于一找到祖先一级部门ID-部门标识不能为空", false);
                    dept_4 = mDeptService.queryDeptDetail(queryDeptDetailReq_2);
                    Assert.isTrue(dept_4 == null || dept_4.getDeptId() == null, "返回值不能为空", false);


                    ManagedDept managedDept_2 = null;
                    if (dept_4 != null) {
                        QueryManageDeptDetailReq queryManageDeptDetailReq_1 = new QueryManageDeptDetailReq();
                        queryManageDeptDetailReq_1.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:254823_1_14642
                        queryManageDeptDetailReq_1.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:254825_1_14642
                        if (dept_4 != null) {
                            queryManageDeptDetailReq_1.setDeptId(dept_4.getDeptId());//SimpleFieldAssign//sourceId:254821_1_14642
                        }

                        /*1-2-14查询管理的部门详情[1087]   */
                        Assert.isNull(queryManageDeptDetailReq_1.getDeptId(), "D1查询一级部门权限管理入口-1-2-14查询管理的部门详情-部门ID不能为空", false);
                        Assert.isNull(queryManageDeptDetailReq_1.getOriginalRoleMemberId(), "D1查询一级部门权限管理入口-1-2-14查询管理的部门详情-身份人员ID不能为空", false);
                        Assert.isNull(queryManageDeptDetailReq_1.getSpaceId(), "D1查询一级部门权限管理入口-1-2-14查询管理的部门详情-创建于空间ID不能为空", false);
                        managedDept_2 = mManagedDeptService.queryManageDeptDetail(queryManageDeptDetailReq_1);


                    }
                    if ((managedDept_2 != null)) {
                        //if(1-2-14查询管理的部门详情.出参 值不等于空 )  14643

                        Dept dept_6 = null;
                        if (managedDept_2 != null) {
                            QueryDeptDetailReq queryDeptDetailReq_3 = new QueryDeptDetailReq();
                            queryDeptDetailReq_3.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:258891_1_14644
                            if (managedDept_2 != null) {
                                queryDeptDetailReq_3.setDeptId(managedDept_2.getDeptId());//SimpleFieldAssign//sourceId:258890_1_14644
                            }

                            /*1-3-09查询大于层级一判断管理的一级部门[218]   */
                            Assert.isNull(queryDeptDetailReq_3.getDeptId(), "D1查询一级部门权限管理入口-1-3-09查询大于层级一判断管理的一级部门-部门ID不能为空", false);
                            Assert.isNull(queryDeptDetailReq_3.getSubjectLifeCycle(), "D1查询一级部门权限管理入口-1-3-09查询大于层级一判断管理的一级部门-主体生命周期不能为空", false);
                            dept_6 = mDeptService.queryDeptDetail(queryDeptDetailReq_3);
                            Assert.isTrue(dept_6 == null || dept_6.getDeptId() == null, "返回值不能为空", false);

                            dept_7 = dept_6;
                        }
//processBranchName:正常结束 ,processBranchId:14645

                    }
                }
            }
        } else if ((reqDto != null && reqDto.getInductionUnitTypeCode() != null && reqDto.getInductionUnitTypeCode().equals("ORG"))) {
            //elseif(D1查询一级部门权限管理入口.就职单位类型实例 等于 组织)  14620

//processBranchName:正常结束 ,processBranchId:14621

        }
        QueryFirstDeptPowerManagePortalDetailRespDto retData = new QueryFirstDeptPowerManagePortalDetailRespDto();
        if (dept_3 != null) {
            retData.setDeptId(dept_3.getDeptId());//SimpleFieldAssign//sourceId:258895_1
            retData.setDeptCode(dept_3.getDeptCode());//SimpleFieldAssign//sourceId:258896_1
            retData.setDeptShortName(dept_3.getDeptShortName());//SimpleFieldAssign//sourceId:258897_1
        }
        if (dept_7 != null) {
            retData.setDeptId(dept_7.getDeptId());//SimpleFieldAssign//sourceId:258895_1
            retData.setDeptCode(dept_7.getDeptCode());//SimpleFieldAssign//sourceId:258896_1
            retData.setDeptShortName(dept_7.getDeptShortName());//SimpleFieldAssign//sourceId:258897_1
        }


        return retData;
    }

    /**
     * D1-3修改组织当前管理对象类型等[4168]
     * gen by moon at 10/2/2022, 5:50:49 AM
     */
    @Trace(operationName = "D1-3修改组织当前管理对象类型等")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public UpdateOrgPresentMgtObjTypeRespDto updateOrgPresentMgtObjType(UpdateOrgPresentMgtObjTypeReqDto reqDto) {


        //virtualUsage 1-3-12查询组织详情  14425
        Organization organization = null;
        QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
        queryOrgDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:254981_1_14425
        if (reqDto != null) {
            queryOrgDetailReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:254980_1_14425
        }

        /*1-3-12查询组织详情[201]   */
        Assert.isNull(queryOrgDetailReq.getOrganizationId(), "D1-3修改组织当前管理对象类型等-1-3-12查询组织详情-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailReq.getSubjectLifeCycle(), "D1-3修改组织当前管理对象类型等-1-3-12查询组织详情-主体生命周期不能为空", false);
        organization = mOrganizationService.queryOrgDetail(queryOrgDetailReq);
        Assert.isTrue(organization == null || organization.getOrganizationId() == null, "返回值不能为空", false);


//virtualUsage 1-3-16查询组织架构类型字典列表  14444
        List<TypeDictionary> listTypeDictionary = new ArrayList<>();
        if (organization != null) {
            QueryOrgClassListReq queryOrgClassListReq = new QueryOrgClassListReq();
            queryOrgClassListReq.setPurposeCode("DEPT_TYPE");//sourceId:255096_1_14444
            queryOrgClassListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:255100_1_14444
            queryOrgClassListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:255103_1_14444
            if (organization != null) {
                queryOrgClassListReq.setOrganizationId(organization.getOrganizationId());//SimpleFieldAssign//sourceId:255097_1_14444
            }

            /*1-3-16查询组织架构类型字典列表[295]   */
            Assert.isNull(queryOrgClassListReq.getOrganizationId(), "D1-3修改组织当前管理对象类型等-1-3-16查询组织架构类型字典列表-组织ID不能为空", false);
            Assert.isNull(queryOrgClassListReq.getPurposeCode(), "D1-3修改组织当前管理对象类型等-1-3-16查询组织架构类型字典列表-类型用途编码不能为空", false);
            Assert.isNull(queryOrgClassListReq.getSubjectLifeCycle(), "D1-3修改组织当前管理对象类型等-1-3-16查询组织架构类型字典列表-主体生命周期不能为空", false);
            Assert.isNull(queryOrgClassListReq.getSpaceId(), "D1-3修改组织当前管理对象类型等-1-3-16查询组织架构类型字典列表-创建于空间ID不能为空", false);
            listTypeDictionary = mTypeDictionaryService.queryOrgClassList(queryOrgClassListReq);


        }
        if ((listTypeDictionary != null && listTypeDictionary != null && listTypeDictionary.size() > 0 && organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("UNMANNED_MGT")) && (organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("COMMON_LOCK") || organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("AUTO_LOCK"))) {
            //if((1-3-16查询组织架构类型字典列表.组织架构数据字典列表数据集条数 大于 0 and 1-3-12查询组织详情.当前管理对象类型 等于 无人管理) and (1-3-12查询组织详情.管理锁定状态 等于 普通锁定 or 1-3-12查询组织详情.管理锁定状态 等于 自动锁定))  14434

            boolean bOOLEAN;
            if (organization != null) {
                Organization organization_2 = new Organization();
                organization_2.setCurrentManageObjectType("DEPTMENT");//sourceId:255061_1_14435
                organization_2.setManageLockStatus("UNLOCK");//sourceId:255056_1_14435
                organization_2.setReasonOfManageLock("---");//NULL//sourceId:255057_1_14435
                organization_2.setUsingLockStatus("AUTO_LOCK");//sourceId:255059_1_14435
                organization_2.setReasonOfUsingLock("组织架构正在维护，暂停使用，请耐心等待～");//CUSTOM_CONVENTION//sourceId:255058_1_14435
                if (organization != null) {
                    organization_2.setOrganizationId(organization.getOrganizationId());//SimpleFieldAssign//sourceId:255053_1_14435
                }

                /*1-3-12修改组织[197]   */
                Assert.isNull(organization_2.getOrganizationId(), "D1-3修改组织当前管理对象类型等-1-3-12修改组织-组织ID不能为空", false);
                Assert.isNull(organization_2.getCurrentManageObjectType(), "D1-3修改组织当前管理对象类型等-1-3-12修改组织-当前管理对象类型不能为空", false);
                Assert.isNull(organization_2.getManageLockStatus(), "D1-3修改组织当前管理对象类型等-1-3-12修改组织-管理锁定状态不能为空", false);
                Assert.isNull(organization_2.getUsingLockStatus(), "D1-3修改组织当前管理对象类型等-1-3-12修改组织-使用锁定状态不能为空", false);
                Assert.isNull(organization_2.getReasonOfUsingLock(), "D1-3修改组织当前管理对象类型等-1-3-12修改组织-使用锁定原因不能为空", false);
                bOOLEAN = mOrganizationService.updateOrg(organization_2);


            }
            StatusCheckItem statusCheckItem = null;
            if (organization != null) {
                QueryCheckItemStatDetailReq queryCheckItemStatDetailReq = new QueryCheckItemStatDetailReq();
                queryCheckItemStatDetailReq.setObjectTypeCode("ORG_CHECK");//sourceId:255073_1_14437
                queryCheckItemStatDetailReq.setCheckItemCode("ORG_MGT_CHECK");//CUSTOM_CONVENTION//sourceId:255072_1_14437
                if (organization != null) {
                    queryCheckItemStatDetailReq.setEntityId(organization.getOrganizationId());//SimpleFieldAssign//sourceId:255074_1_14437
                }

                /*1-1-22查询状态校验项详情[327]   */
                Assert.isNull(queryCheckItemStatDetailReq.getEntityId(), "D1-3修改组织当前管理对象类型等-1-1-22查询状态校验项详情-内容对象实例ID不能为空", false);
                Assert.isNull(queryCheckItemStatDetailReq.getObjectTypeCode(), "D1-3修改组织当前管理对象类型等-1-1-22查询状态校验项详情-内容对象类型编码不能为空", false);
                Assert.isNull(queryCheckItemStatDetailReq.getCheckItemCode(), "D1-3修改组织当前管理对象类型等-1-1-22查询状态校验项详情-检查项标识不能为空", false);
                statusCheckItem = mStatusCheckItemService.queryCheckItemStatDetail(queryCheckItemStatDetailReq);
                Assert.isTrue(statusCheckItem == null || statusCheckItem.getStatusCheckItemId() == null, "返回值不能为空", false);


            }
            if ((statusCheckItem != null && statusCheckItem.getIsComplete() != null && statusCheckItem.getIsComplete().equals("TRUE"))) {
                //if(1-1-22查询状态校验项详情.是否已完成 等于 是)  14438

                boolean bOOLEAN_1;
                if (statusCheckItem != null) {
                    StatusCheckItem statusCheckItem_2 = new StatusCheckItem();
                    statusCheckItem_2.setIsComplete("FALSE");//sourceId:255090_1_14439
                    if (statusCheckItem != null) {
                        statusCheckItem_2.setStatusCheckItemId(statusCheckItem.getStatusCheckItemId());//SimpleFieldAssign//sourceId:255086_1_14439
                    }

                    /*1-1-22修改状态校验项	[325]   */
                    Assert.isNull(statusCheckItem_2.getStatusCheckItemId(), "D1-3修改组织当前管理对象类型等-1-1-22修改状态校验项	-状态校验项ID不能为空", false);
                    Assert.isNull(statusCheckItem_2.getIsComplete(), "D1-3修改组织当前管理对象类型等-1-1-22修改状态校验项	-是否已完成不能为空", false);
                    bOOLEAN_1 = mStatusCheckItemService.updateCheckItemStat(statusCheckItem_2);


                }
//processBranchName:正常结束 ,processBranchId:14440

            } else {
                //else  14441

//异常结束 14442
                throw new BizException("C00029", "对不起，异常错误，不可操作～！", false);
            }
        } else {
            //else  14436

//异常结束 14443
            throw new BizException("C00029", "对不起，异常错误，不可操作～！", false);
        }
        UpdateOrgPresentMgtObjTypeRespDto retData = new UpdateOrgPresentMgtObjTypeRespDto();


        return retData;
    }

    /**
     * D1-3更新组织成员检查项状态等(公共)[4169]
     * gen by moon at 8/24/2022, 10:00:19 PM
     */
    @Trace(operationName = "D1-3更新组织成员检查项状态等(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public RefreshOrgMemberCheckItemEtcComRespDto refreshOrgMemberCheckItemEtcCom(RefreshOrgMemberCheckItemEtcComReqDto reqDto) {


        //virtualUsage 1-3-12查询组织详情  14448
        Organization organization = null;
        QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
        queryOrgDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:255297_1_14448
        if (reqDto != null) {
            queryOrgDetailReq.setOrganizationId(reqDto.getOrganizationId());//sourceId:255277_1_14448
        }

        /*1-3-12查询组织详情[201]   */
        Assert.isNull(queryOrgDetailReq.getOrganizationId(), "D1-3更新组织成员检查项状态等(公共)-1-3-12查询组织详情-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailReq.getSubjectLifeCycle(), "D1-3更新组织成员检查项状态等(公共)-1-3-12查询组织详情-主体生命周期不能为空", false);
        organization = mOrganizationService.queryOrgDetail(queryOrgDetailReq);


//virtualUsage 1-3-09查询部门列表  14449
        List<Dept> listDept = new ArrayList<>();
        Assert.isTrue(organization == null || organization.getOrganizationId() == null, "返回值不能为空", false);
        if (organization != null) {
            QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
            queryDeptListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:255302_1_14449
            if (organization != null) {
                queryDeptListReq.setOrganizationId(organization.getOrganizationId());//sourceId:255300_1_14449
            }

            /*1-3-09查询部门列表[217]   */
            Assert.isNull(queryDeptListReq.getOrganizationId(), "D1-3更新组织成员检查项状态等(公共)-1-3-09查询部门列表-组织ID不能为空", false);
            Assert.isNull(queryDeptListReq.getSubjectLifeCycle(), "D1-3更新组织成员检查项状态等(公共)-1-3-09查询部门列表-主体生命周期不能为空", false);
            listDept = mDeptService.queryDeptList(queryDeptListReq);


        }
//virtualUsage 1-1-01查询底层框架服务批次列表  14450
        List<Batch> listBatch = new ArrayList<>();
        Assert.isTrue(organization == null || organization.getOrganizationId() == null, "返回值不能为空", false);
        if (organization != null) {
            QueryBaseBatchListReq queryBaseBatchListReq = new QueryBaseBatchListReq();
            queryBaseBatchListReq.setPurposeTypeCode("ORG");//sourceId:255418_1_14450
            queryBaseBatchListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:255419_1_14450
            if (organization != null) {
                queryBaseBatchListReq.setAscriptionObjectId(organization.getOrganizationId());//sourceId:255417_1_14450
            }

            /*1-1-01查询底层框架服务批次列表[227]   */
            Assert.isNull(queryBaseBatchListReq.getAscriptionObjectId(), "D1-3更新组织成员检查项状态等(公共)-1-1-01查询底层框架服务批次列表-归属对象ID不能为空", false);
            Assert.isNull(queryBaseBatchListReq.getPurposeTypeCode(), "D1-3更新组织成员检查项状态等(公共)-1-1-01查询底层框架服务批次列表-用途类型编码不能为空", false);
            Assert.isNull(queryBaseBatchListReq.getSpaceId(), "D1-3更新组织成员检查项状态等(公共)-1-1-01查询底层框架服务批次列表-创建于空间ID不能为空", false);
            listBatch = mBatchService.queryBaseBatchList(queryBaseBatchListReq);


        }
//virtualUsage 1-1-01查询当前最新批次信息  14451
        Batch batch = null;
        Assert.isTrue(organization == null || organization.getOrganizationId() == null, "返回值不能为空", false);
        if (organization != null) {
            QueryBaseBatchDetailReq queryBaseBatchDetailReq = new QueryBaseBatchDetailReq();
            queryBaseBatchDetailReq.setPurposeTypeCode("ORG");//sourceId:255421_1_14451
            queryBaseBatchDetailReq.setIsNewbatch("TRUE");//sourceId:255423_1_14451
            if (organization != null) {
                queryBaseBatchDetailReq.setAscriptionObjectId(organization.getOrganizationId());//sourceId:255422_1_14451
            }

            /*1-1-01查询当前最新批次信息[44]   */
            Assert.isNull(queryBaseBatchDetailReq.getAscriptionObjectId(), "D1-3更新组织成员检查项状态等(公共)-1-1-01查询当前最新批次信息-归属对象ID不能为空", false);
            Assert.isNull(queryBaseBatchDetailReq.getPurposeTypeCode(), "D1-3更新组织成员检查项状态等(公共)-1-1-01查询当前最新批次信息-用途类型编码不能为空", false);
            Assert.isNull(queryBaseBatchDetailReq.getIsNewbatch(), "D1-3更新组织成员检查项状态等(公共)-1-1-01查询当前最新批次信息-是否最新批次不能为空", false);
            batch = mBatchService.queryBaseBatchDetail(queryBaseBatchDetailReq);


        }
        if ((organization != null && organization.getCurrentManageObjectType() != null && organization.getCurrentManageObjectType().equals("MEMBER") && organization != null && organization.getManageLockStatus() != null && organization.getManageLockStatus().equals("AUTO_LOCK") && batch != null && batch.getSubjectLifeCycle() != null && batch.getSubjectLifeCycle().equals("EDITING") && listDept != null && listDept != null && listDept.size() != 0 && listBatch != null && listBatch != null && listBatch.size() >= 1)) {
            //if((1-3-12查询组织详情.当前管理对象类型 等于 成员 and 1-3-12查询组织详情.管理锁定状态 等于 自动锁定 and 1-1-01查询当前最新批次信息.主体生命周期 等于 正在编辑 and 1-3-09查询部门列表.部门列表数据集条数 不等于 0 and 1-1-01查询底层框架服务批次列表.底层框架批次列表数据集条数 大于等于 1))  14452

            boolean bOOLEAN;
            Assert.isTrue(organization == null || organization.getOrganizationId() == null, "返回值不能为空", false);
            if (organization != null) {
                Organization organization_2 = new Organization();
                organization_2.setCurrentManageObjectType("UNMANNED_MGT");//sourceId:255427_1_14453
                organization_2.setManageLockStatus("AUTO_LOCK");//sourceId:255428_1_14453
                organization_2.setReasonOfManageLock("组织架构成员已确认设置完成，锁定停止维护。");//CUSTOM_CONVENTION//sourceId:255429_1_14453
                organization_2.setUsingLockStatus("UNLOCK");//sourceId:255431_1_14453
                organization_2.setReasonOfUsingLock("---");//NULL//sourceId:255430_1_14453
                if (organization != null) {
                    organization_2.setOrganizationId(organization.getOrganizationId());//sourceId:255426_1_14453
                }

                /*1-3-12修改组织[197]   */
                Assert.isNull(organization_2.getOrganizationId(), "D1-3更新组织成员检查项状态等(公共)-1-3-12修改组织-组织ID不能为空", false);
                Assert.isNull(organization_2.getCurrentManageObjectType(), "D1-3更新组织成员检查项状态等(公共)-1-3-12修改组织-当前管理对象类型不能为空", false);
                Assert.isNull(organization_2.getManageLockStatus(), "D1-3更新组织成员检查项状态等(公共)-1-3-12修改组织-管理锁定状态不能为空", false);
                Assert.isNull(organization_2.getReasonOfManageLock(), "D1-3更新组织成员检查项状态等(公共)-1-3-12修改组织-管理锁定原因不能为空", false);
                bOOLEAN = mOrganizationService.updateOrg(organization_2);


            }
        } else {
            //else  14466

//异常结束 14467
            throw new BizException("C00029", "对不起，异常错误，不可操作～！", false);
        }
        RefreshOrgMemberCheckItemEtcComRespDto retData = new RefreshOrgMemberCheckItemEtcComRespDto();


        return retData;
    }

    /**
     * D1计算部门层级加一(公共)[4170]
     * gen by moon at 1/24/2024, 7:08:33 PM
     */
    @Trace(operationName = "D1计算部门层级加一(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public CalculateDeptLevelPlusOneComRespDto calculateDeptLevelPlusOneCom(CalculateDeptLevelPlusOneComReqDto reqDto) {


        CalculateAdditionOfTwoNumsComRespDto calculateAdditionOfTwoNumsComRespDto_1 = null;
        CalculateDeptValueTransferPlusOneRespDto receptionServiceRes_1 = null;
        if ((reqDto != null && reqDto.getDeptId() != null)) {
            //if(D1计算部门层级加一(公共).部门ID 值不等于空 )  14471

            Dept dept = null;
            QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
            if (reqDto != null) {
                queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:255519_1_14472
            }

            /*1-3-09查询上级部门层级[218]   */

            dept = mDeptService.queryDeptDetail(queryDeptDetailReq)/*vcase invoke 本地 method 方法调用;*/;


            CalculateAdditionOfTwoNumsComRespDto calculateAdditionOfTwoNumsComRespDto = null;
            if (dept != null) {
                CalculateAdditionOfTwoNumsComReqDto calculateAdditionOfTwoNumsComReqDto = new CalculateAdditionOfTwoNumsComReqDto();
                calculateAdditionOfTwoNumsComReqDto.setCalcPara2(Double.valueOf("1"));//CUSTOM_CONVENTION//sourceId:1499906_1_60093
                if (dept != null) {
                    calculateAdditionOfTwoNumsComReqDto.setCalcPara1(dept.getLevelNumber() != null ? Double.valueOf(dept.getLevelNumber()) : null);//SimpleFieldAssign//sourceId:1499905_1_60093
                }

                /*D2-计算两个数值相加(公共)[8137]   */
                Assert.isNull(calculateAdditionOfTwoNumsComReqDto.getCalcPara1(), "D1计算部门层级加一(公共)-D2-计算两个数值相加(公共)-计算入参1不能为空", false);
                Assert.isNull(calculateAdditionOfTwoNumsComReqDto.getCalcPara2(), "D1计算部门层级加一(公共)-D2-计算两个数值相加(公共)-计算入参2不能为空", false);
                calculateAdditionOfTwoNumsComRespDto = interfaceModeService.calculateAdditionOfTwoNumsCom(calculateAdditionOfTwoNumsComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                calculateAdditionOfTwoNumsComRespDto_1 = calculateAdditionOfTwoNumsComRespDto;
            }
//processBranchName:正常结束 ,processBranchId:14477

        } else {
            //else  14474

//ModelCode: receptionService
            CalculateDeptValueTransferPlusOneRespDto receptionServiceRes = null;
            CalculateDeptValueTransferPlusOneReqDto receptionServiceReq = new CalculateDeptValueTransferPlusOneReqDto();
            receptionServiceReq.setOutputNum(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:381121_1_19647

            /*M1-默认传值1[4924]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq.getOutputNum(), "D1计算部门层级加一(公共)-M1-默认传值1-传输数值（整数型）不能为空", false);
            receptionServiceRes = nbOrg.calculateDeptValueTransferPlusOne(receptionServiceReq);


            receptionServiceRes_1 = receptionServiceRes;
//processBranchName:正常结束 ,processBranchId:14476

        }
        CalculateDeptLevelPlusOneComRespDto retData = new CalculateDeptLevelPlusOneComRespDto();
        if (calculateAdditionOfTwoNumsComRespDto_1 != null) {
            retData.setOutputNum(calculateAdditionOfTwoNumsComRespDto_1.getCalcResult() != null ? calculateAdditionOfTwoNumsComRespDto_1.getCalcResult().longValue() : null);//SimpleFieldAssign//sourceId:381123_1
        }
        if (receptionServiceRes_1 != null) {
            retData.setOutputNum(receptionServiceRes_1.getOutputNum());//SimpleFieldAssign//sourceId:381123_1
        }


        return retData;
    }

    /**
     * D1-3判断新增部门操作可用(公共)[4334]
     * gen by moon at 1/24/2024, 3:48:00 AM
     */
    @Trace(operationName = "D1-3判断新增部门操作可用(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public JudgeAddDeptUsableComRespDto judgeAddDeptUsableCom(JudgeAddDeptUsableComReqDto reqDto) {


        JudgeOrgOnlyPowerComRespDto judgeOrgOnlyPowerComRespDto_1 = null;
//virtualUsage 1-3-09查询部门（判断该部门是否存在）  15303
        Dept dept = null;
        QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
        queryDeptDetailReq.setIsArchive("FALSE");//sourceId:302248_1_15303
        if (reqDto != null) {
            queryDeptDetailReq.setParentDeptId(reqDto.getParentDeptId());//SimpleFieldAssign//sourceId:286335_1_15303
            queryDeptDetailReq.setDeptName(reqDto.getDeptName());//SimpleFieldAssign//sourceId:287421_1_15303
            queryDeptDetailReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:286333_1_15303
        }

        /*1-3-09查询部门（判断该部门是否存在）[218]   */
        Assert.isNull(queryDeptDetailReq.getDeptName(), "D1-3判断新增部门操作可用(公共)-1-3-09查询部门（判断该部门是否存在）-部门名称（中文）不能为空", false);
        Assert.isNull(queryDeptDetailReq.getOrganizationId(), "D1-3判断新增部门操作可用(公共)-1-3-09查询部门（判断该部门是否存在）-组织ID不能为空", false);
        Assert.isNull(queryDeptDetailReq.getIsArchive(), "D1-3判断新增部门操作可用(公共)-1-3-09查询部门（判断该部门是否存在）-是否存档不能为空", false);
        dept = mDeptService.queryDeptDetail(queryDeptDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        if ((dept == null && reqDto != null && reqDto.getSubjectLifeCycle() != null && reqDto.getSubjectLifeCycle().equals("CURRENTLY_VALID"))) {
            //if((1-3-09查询部门（判断新增部门是否存在）.出参 值等于空  and D1-3判断新增部门操作可用(公共).主体生命周期 等于 当前有效))  15304

            if ((reqDto != null && reqDto.getParentDeptId() != null)) {
                //if(D1-3判断新增部门操作可用(公共).父级部门ID 值不等于空 )  15420

                Dept dept_2 = null;
                QueryDeptDetailReq queryDeptDetailReq_1 = new QueryDeptDetailReq();
                if (reqDto != null) {
                    queryDeptDetailReq_1.setDeptId(reqDto.getParentDeptId());//SimpleFieldAssign//sourceId:286345_1_15421
                    queryDeptDetailReq_1.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:286373_1_15421
                }

                /*1-3-09查询上级部门（用于判断父级部门是否发布生效）[218]   */
                Assert.isNull(queryDeptDetailReq_1.getDeptId(), "D1-3判断新增部门操作可用(公共)-1-3-09查询上级部门（用于判断父级部门是否发布生效）-部门ID不能为空", false);
                Assert.isNull(queryDeptDetailReq_1.getOrganizationId(), "D1-3判断新增部门操作可用(公共)-1-3-09查询上级部门（用于判断父级部门是否发布生效）-组织ID不能为空", false);
                dept_2 = mDeptService.queryDeptDetail(queryDeptDetailReq_1)/*vcase invoke 本地 method 方法调用;*/;
                Assert.isTrue(dept_2 == null || dept_2.getDeptId() == null, "找不到数据，系统异常", false);


                if ((dept_2 != null && dept_2.getSubjectLifeCycle() != null && dept_2.getSubjectLifeCycle().equals("CURRENTLY_VALID"))) {
                    //if(1-3-09查询上级部门（用于判断父级部门是否发布生效）.主体生命周期 等于 当前有效)  15422

                    JudgeOrgOnlyPowerComRespDto judgeOrgOnlyPowerComRespDto = null;
                    JudgeOrgOnlyPowerComReqDto judgeOrgOnlyPowerComReqDto = new JudgeOrgOnlyPowerComReqDto();
                    judgeOrgOnlyPowerComReqDto.setRoleCode("ORG_ADMIN");//CUSTOM_CONVENTION//sourceId:286338_1_15423
                    judgeOrgOnlyPowerComReqDto.setPrivacyCode("MGT_ORG_POWER");//CUSTOM_CONVENTION//sourceId:286339_1_15423
                    judgeOrgOnlyPowerComReqDto.setBatchMgtOperationType("DEPT_OPERATION");//sourceId:286344_1_15423
                    if (reqDto != null) {
                        judgeOrgOnlyPowerComReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:286340_1_15423
                    }

                    /*D1判断组织架构唯一权限(公共)[3877]   */
                    Assert.isNull(judgeOrgOnlyPowerComReqDto.getOrganizationId(), "D1-3判断新增部门操作可用(公共)-D1判断组织架构唯一权限(公共)-组织ID不能为空", false);
                    Assert.isNull(judgeOrgOnlyPowerComReqDto.getRoleCode(), "D1-3判断新增部门操作可用(公共)-D1判断组织架构唯一权限(公共)-角色标识不能为空", false);
                    Assert.isNull(judgeOrgOnlyPowerComReqDto.getPrivacyCode(), "D1-3判断新增部门操作可用(公共)-D1判断组织架构唯一权限(公共)-权限标识不能为空", false);
                    Assert.isNull(judgeOrgOnlyPowerComReqDto.getBatchMgtOperationType(), "D1-3判断新增部门操作可用(公共)-D1判断组织架构唯一权限(公共)-批次下管理操作类型不能为空", false);
                    judgeOrgOnlyPowerComRespDto = powerService.judgeOrgOnlyPowerCom(judgeOrgOnlyPowerComReqDto)/*vcase invoke isSameApp*/;


                    judgeOrgOnlyPowerComRespDto_1 = judgeOrgOnlyPowerComRespDto;
//processBranchName:正常结束 ,processBranchId:15424

                } else {
                    //else  15425

//异常结束 15426
                    throw new BizException("10300087", "对不起，父级部门还未发布，当前部门不能发布，请先发布父级部门！", false);
                }
            } else {
                //else  15427

                JudgeOrgOnlyPowerComRespDto judgeOrgOnlyPowerComRespDto_2 = null;
                JudgeOrgOnlyPowerComReqDto judgeOrgOnlyPowerComReqDto_1 = new JudgeOrgOnlyPowerComReqDto();
                judgeOrgOnlyPowerComReqDto_1.setRoleCode("ORG_ADMIN");//CUSTOM_CONVENTION//sourceId:286338_1_15428
                judgeOrgOnlyPowerComReqDto_1.setPrivacyCode("MGT_ORG_POWER");//CUSTOM_CONVENTION//sourceId:286339_1_15428
                judgeOrgOnlyPowerComReqDto_1.setBatchMgtOperationType("DEPT_OPERATION");//sourceId:286344_1_15428
                if (reqDto != null) {
                    judgeOrgOnlyPowerComReqDto_1.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:286340_1_15428
                }

                /*D1判断组织架构唯一权限(公共)[3877]   */
                Assert.isNull(judgeOrgOnlyPowerComReqDto_1.getOrganizationId(), "D1-3判断新增部门操作可用(公共)-D1判断组织架构唯一权限(公共)-组织ID不能为空", false);
                Assert.isNull(judgeOrgOnlyPowerComReqDto_1.getRoleCode(), "D1-3判断新增部门操作可用(公共)-D1判断组织架构唯一权限(公共)-角色标识不能为空", false);
                Assert.isNull(judgeOrgOnlyPowerComReqDto_1.getPrivacyCode(), "D1-3判断新增部门操作可用(公共)-D1判断组织架构唯一权限(公共)-权限标识不能为空", false);
                Assert.isNull(judgeOrgOnlyPowerComReqDto_1.getBatchMgtOperationType(), "D1-3判断新增部门操作可用(公共)-D1判断组织架构唯一权限(公共)-批次下管理操作类型不能为空", false);
                judgeOrgOnlyPowerComRespDto_2 = powerService.judgeOrgOnlyPowerCom(judgeOrgOnlyPowerComReqDto_1)/*vcase invoke isSameApp*/;


                judgeOrgOnlyPowerComRespDto_1 = judgeOrgOnlyPowerComRespDto_2;
//processBranchName:正常结束 ,processBranchId:15429

            }
        } else if ((dept == null && reqDto != null && reqDto.getSubjectLifeCycle() != null && reqDto.getSubjectLifeCycle().equals("EDITING"))) {
            //elseif((1-3-09查询部门（判断新增部门是否存在）.出参 值等于空  and D1-3判断新增部门操作可用(公共).主体生命周期 等于 正在编辑))  15331

            JudgeOrgOnlyPowerComRespDto judgeOrgOnlyPowerComRespDto_3 = null;
            JudgeOrgOnlyPowerComReqDto judgeOrgOnlyPowerComReqDto_2 = new JudgeOrgOnlyPowerComReqDto();
            judgeOrgOnlyPowerComReqDto_2.setRoleCode("ORG_ADMIN");//CUSTOM_CONVENTION//sourceId:286338_1_15332
            judgeOrgOnlyPowerComReqDto_2.setPrivacyCode("MGT_ORG_POWER");//CUSTOM_CONVENTION//sourceId:286339_1_15332
            judgeOrgOnlyPowerComReqDto_2.setBatchMgtOperationType("DEPT_OPERATION");//sourceId:286344_1_15332
            if (reqDto != null) {
                judgeOrgOnlyPowerComReqDto_2.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:286340_1_15332
            }

            /*D1判断组织架构唯一权限(公共)[3877]   */
            Assert.isNull(judgeOrgOnlyPowerComReqDto_2.getOrganizationId(), "D1-3判断新增部门操作可用(公共)-D1判断组织架构唯一权限(公共)-组织ID不能为空", false);
            Assert.isNull(judgeOrgOnlyPowerComReqDto_2.getRoleCode(), "D1-3判断新增部门操作可用(公共)-D1判断组织架构唯一权限(公共)-角色标识不能为空", false);
            Assert.isNull(judgeOrgOnlyPowerComReqDto_2.getPrivacyCode(), "D1-3判断新增部门操作可用(公共)-D1判断组织架构唯一权限(公共)-权限标识不能为空", false);
            Assert.isNull(judgeOrgOnlyPowerComReqDto_2.getBatchMgtOperationType(), "D1-3判断新增部门操作可用(公共)-D1判断组织架构唯一权限(公共)-批次下管理操作类型不能为空", false);
            judgeOrgOnlyPowerComRespDto_3 = powerService.judgeOrgOnlyPowerCom(judgeOrgOnlyPowerComReqDto_2)/*vcase invoke isSameApp*/;


            judgeOrgOnlyPowerComRespDto_1 = judgeOrgOnlyPowerComRespDto_3;
//processBranchName:正常结束 ,processBranchId:15333

        } else if ((dept != null)) {
            //elseif(1-3-09查询部门（判断新增部门是否存在）.出参 值不等于空 )  15334

//异常结束 15335
            throw new BizException("10300119", "对不起，该部门已存在~！", false);
        }
        JudgeAddDeptUsableComRespDto retData = new JudgeAddDeptUsableComRespDto();
        if (judgeOrgOnlyPowerComRespDto_1 != null) {
            retData.setOutputNum(judgeOrgOnlyPowerComRespDto_1.getOutputNum());//SimpleFieldAssign//sourceId:286392_1
        }


        return retData;
    }

    /**
     * D1-3判断修改部门操作可用(公共)[4333]
     * gen by moon at 1/24/2024, 7:08:51 PM
     */
    @Trace(operationName = "D1-3判断修改部门操作可用(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public JudgeUpdateUsableComRespDto judgeUpdateUsableCom(JudgeUpdateUsableComReqDto reqDto) {


        JudgeOrgOnlyPowerComRespDto judgeOrgOnlyPowerComRespDto_1 = null;
//virtualUsage 1-3-09查询当前部门生命周期正在编辑状态  15480
        Dept dept = null;
        QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
        if (reqDto != null) {
            queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:286228_1_15480
        }

        /*1-3-09查询当前部门生命周期正在编辑状态[218]   */
        Assert.isNull(queryDeptDetailReq.getDeptId(), "D1-3判断修改部门操作可用(公共)-1-3-09查询当前部门生命周期正在编辑状态-部门ID不能为空", false);
        dept = mDeptService.queryDeptDetail(queryDeptDetailReq)/*vcase invoke 本地 method 方法调用;*/;
        Assert.isTrue(dept == null || dept.getDeptId() == null, "找不到数据，系统异常", false);


        if ((dept != null && dept.getSubjectLifeCycle() != null && dept.getSubjectLifeCycle().equals("EDITING"))) {
            //if(1-3-09查询当前部门生命周期状态.主体生命周期 等于 正在编辑)  15481

            if ((dept != null && dept.getParentDeptId() != null && reqDto != null && reqDto.getSubjectLifeCycle() != null && reqDto.getSubjectLifeCycle().equals("CURRENTLY_VALID"))) {
                //if((1-3-09查询当前部门生命周期状态.父级部门ID 值不等于空  and D1-3判断修改部门操作可用(公共).主体生命周期 等于 当前有效))  15510

                Dept dept_2 = null;
                if (dept != null) {
                    QueryDeptDetailReq queryDeptDetailReq_1 = new QueryDeptDetailReq();
                    if (dept != null) {
                        queryDeptDetailReq_1.setDeptId(dept.getParentDeptId());//SimpleFieldAssign//sourceId:286262_1_15511
                        queryDeptDetailReq_1.setOrganizationId(dept.getOrganizationId());//SimpleFieldAssign//sourceId:286290_1_15511
                    }

                    /*1-3-09查询父级部门是否当前有效[218]   */
                    Assert.isNull(queryDeptDetailReq_1.getDeptId(), "D1-3判断修改部门操作可用(公共)-1-3-09查询父级部门是否当前有效-部门ID不能为空", false);
                    Assert.isNull(queryDeptDetailReq_1.getOrganizationId(), "D1-3判断修改部门操作可用(公共)-1-3-09查询父级部门是否当前有效-组织ID不能为空", false);
                    dept_2 = mDeptService.queryDeptDetail(queryDeptDetailReq_1)/*vcase invoke 本地 method 方法调用;*/;


                }
                if ((dept_2 != null && dept_2.getSubjectLifeCycle() != null && dept_2.getSubjectLifeCycle().equals("EDITING"))) {
                    //if(1-3-09查询父级部门是否当前有效.主体生命周期 等于 正在编辑)  15512

//异常结束 15513
                    throw new BizException("10300118", "对不起！上级部门未发布，请将上级部门发布生效后再进行操作~", false);
                }
            }
            if ((reqDto != null && reqDto.getDeptName() != null)) {
                //if(D1-3判断修改部门操作可用(公共).部门名称（中文） 值不等于空 )  15514

                Dept dept_4 = null;
                QueryDeptDetailReq queryDeptDetailReq_2 = new QueryDeptDetailReq();
                if (reqDto != null) {
                    queryDeptDetailReq_2.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:301894_1_15515
                    queryDeptDetailReq_2.setDeptName(reqDto.getDeptName());//SimpleFieldAssign//sourceId:301924_1_15515
                }

                /*1-3-09查询当前部门名称是否修改[218]   */
                Assert.isNull(queryDeptDetailReq_2.getDeptId(), "D1-3判断修改部门操作可用(公共)-1-3-09查询当前部门名称是否修改-部门ID不能为空", false);
                Assert.isNull(queryDeptDetailReq_2.getDeptName(), "D1-3判断修改部门操作可用(公共)-1-3-09查询当前部门名称是否修改-部门名称（中文）不能为空", false);
                dept_4 = mDeptService.queryDeptDetail(queryDeptDetailReq_2)/*vcase invoke 本地 method 方法调用;*/;


                if ((dept_4 == null)) {
                    //if(1-3-09查询当前部门名称是否修改.出参 值等于空 )  15517

                    List<Dept> listDept = new ArrayList<>();
                    if (dept != null) {
                        QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
                        queryDeptListReq.setIsArchive("FALSE");//sourceId:301889_1_15518
                        if (reqDto != null) {
                            queryDeptListReq.setDeptName(reqDto.getDeptName());//SimpleFieldAssign//sourceId:301882_1_15518
                        }
                        if (dept != null) {
                            queryDeptListReq.setParentDeptId(dept.getParentDeptId());//SimpleFieldAssign//sourceId:301926_1_15518
                            queryDeptListReq.setOrganizationId(dept.getOrganizationId());//SimpleFieldAssign//sourceId:301927_1_15518
                        }

                        /*1-3-09查询组织或父级部门下是否重名[217]   */
                        Assert.isNull(queryDeptListReq.getDeptName(), "D1-3判断修改部门操作可用(公共)-1-3-09查询组织或父级部门下是否重名-部门名称（中文）不能为空", false);
                        Assert.isNull(queryDeptListReq.getOrganizationId(), "D1-3判断修改部门操作可用(公共)-1-3-09查询组织或父级部门下是否重名-组织ID不能为空", false);
                        Assert.isNull(queryDeptListReq.getIsArchive(), "D1-3判断修改部门操作可用(公共)-1-3-09查询组织或父级部门下是否重名-是否存档不能为空", false);
                        listDept = mDeptService.queryDeptList(queryDeptListReq)/*vcase invoke 本地 method 方法调用;*/;


                    }
                    if ((listDept != null && listDept != null && listDept.size() > 0)) {
                        //if(1-3-09查询组织或父级部门下是否重名.部门列表数据集条数 大于 0)  15519

//异常结束 15520
                        throw new BizException("10300122", "对不起！修改的部门名称相同，请检查后重新修改~", false);
                    }
                }
            }
            JudgeOrgOnlyPowerComRespDto judgeOrgOnlyPowerComRespDto = null;
            if (dept != null) {
                JudgeOrgOnlyPowerComReqDto judgeOrgOnlyPowerComReqDto = new JudgeOrgOnlyPowerComReqDto();
                judgeOrgOnlyPowerComReqDto.setRoleCode("ORG_ADMIN");//CUSTOM_CONVENTION//sourceId:286294_1_15521
                judgeOrgOnlyPowerComReqDto.setPrivacyCode("MGT_ORG_POWER");//CUSTOM_CONVENTION//sourceId:286295_1_15521
                judgeOrgOnlyPowerComReqDto.setBatchMgtOperationType("DEPT_OPERATION");//sourceId:286300_1_15521
                if (dept != null) {
                    judgeOrgOnlyPowerComReqDto.setOrganizationId(dept.getOrganizationId());//SimpleFieldAssign//sourceId:286296_1_15521
                }

                /*D1判断组织架构唯一权限(公共)[3877]   */
                Assert.isNull(judgeOrgOnlyPowerComReqDto.getOrganizationId(), "D1-3判断修改部门操作可用(公共)-D1判断组织架构唯一权限(公共)-组织ID不能为空", false);
                Assert.isNull(judgeOrgOnlyPowerComReqDto.getRoleCode(), "D1-3判断修改部门操作可用(公共)-D1判断组织架构唯一权限(公共)-角色标识不能为空", false);
                Assert.isNull(judgeOrgOnlyPowerComReqDto.getPrivacyCode(), "D1-3判断修改部门操作可用(公共)-D1判断组织架构唯一权限(公共)-权限标识不能为空", false);
                Assert.isNull(judgeOrgOnlyPowerComReqDto.getBatchMgtOperationType(), "D1-3判断修改部门操作可用(公共)-D1判断组织架构唯一权限(公共)-批次下管理操作类型不能为空", false);
                judgeOrgOnlyPowerComRespDto = powerService.judgeOrgOnlyPowerCom(judgeOrgOnlyPowerComReqDto)/*vcase invoke isSameApp*/;


                judgeOrgOnlyPowerComRespDto_1 = judgeOrgOnlyPowerComRespDto;
            }
//processBranchName:正常结束 ,processBranchId:15522

        } else if ((!(dept != null && dept.getSubjectLifeCycle() != null && dept.getSubjectLifeCycle().equals("EDITING")))) {
            //elseif(1-3-09查询当前部门生命周期状态.主体生命周期 不等于 正在编辑)  15496

//异常结束 15497
            throw new BizException("10300123", "对不起，不可修改部门，当前部门状态异常，请联系管理员~。", false);
        }
        JudgeUpdateUsableComRespDto retData = new JudgeUpdateUsableComRespDto();
        if (judgeOrgOnlyPowerComRespDto_1 != null) {
            retData.setOutputNum(judgeOrgOnlyPowerComRespDto_1.getOutputNum());//SimpleFieldAssign//sourceId:286399_1
        }


        return retData;
    }

    /**
     * D1-3查询下级部门树状结构(公共)(边界)[1845]
     * gen by moon at 10/2/2022, 1:56:28 AM
     */
    @Trace(operationName = "D1-3查询下级部门树状结构(公共)(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySubordinateDeptTreeListComBorderRespDto querySubordinateDeptTreeListComBorder(QuerySubordinateDeptTreeListComBorderReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//步骤0: 1-3-09查询部门树状结构列表 - queryDeptTreeList
        List<Dept> listDept = new ArrayList<>();
        QueryDeptTreeListReq queryDeptTreeListReq = new QueryDeptTreeListReq();
        queryDeptTreeListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:56615_1
        if (reqDto != null) {
            queryDeptTreeListReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:56611_1
            queryDeptTreeListReq.setDeptCode(reqDto.getDeptCode());//SimpleFieldAssign//sourceId:56612_1
            queryDeptTreeListReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:221694_1
            queryDeptTreeListReq.setParentDeptId(reqDto.getParentDeptId());//SimpleFieldAssign//sourceId:221695_1
            queryDeptTreeListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:221696_1
            queryDeptTreeListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:56613_1
            queryDeptTreeListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:56614_1
        }

        /*1-3-09查询部门树状结构列表[1846]   */
        Assert.isNull(queryDeptTreeListReq.getSpaceId(), "D1-3查询下级部门树状结构(公共)(边界)-1-3-09查询部门树状结构列表-创建于空间ID不能为空", false);
        listDept = mDeptService.queryDeptTreeList(queryDeptTreeListReq);


        listDept_1 = listDept;

        QuerySubordinateDeptTreeListComBorderRespDto retData = new QuerySubordinateDeptTreeListComBorderRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:63996_1


        return retData;
    }

    /**
     * D1-3查询下级直属部门列表[3077]
     * gen by moon at 10/2/2022, 3:18:17 AM
     */
    @Trace(operationName = "D1-3查询下级直属部门列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySubordinateDirectlyDeptListRespDto querySubordinateDirectlyDeptList(QuerySubordinateDirectlyDeptListReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//步骤0: 1-3-09查询部门列表 - queryDeptList
        List<Dept> listDept = new ArrayList<>();
        QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
        queryDeptListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:104245_1
        if (reqDto != null) {
            queryDeptListReq.setParentDeptId(reqDto.getParentDeptId());//SimpleFieldAssign//sourceId:104233_1
            queryDeptListReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:234193_1
            queryDeptListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:104234_1
        }

        /*1-3-09查询部门列表[217]   */
        Assert.isNull(queryDeptListReq.getSubjectLifeCycle(), "D1-3查询下级直属部门列表-1-3-09查询部门列表-主体生命周期不能为空", false);
        listDept = mDeptService.queryDeptList(queryDeptListReq);


        listDept_1 = listDept;

        QuerySubordinateDirectlyDeptListRespDto retData = new QuerySubordinateDirectlyDeptListRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:104257_1


        return retData;
    }

    /**
     * D1-3查询部门设置详情(管理)[657]
     * gen by moon at 8/22/2024, 11:49:23 PM
     */
    @Trace(operationName = "D1-3查询部门设置详情(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptSetDetailRespDto queryDeptSetDetail(QueryDeptSetDetailReqDto reqDto) {


        Dept dept_1 = null;
        ReviseBaseChangeColComRespDto reviseBaseChangeColComRespDto_1 = null;
        Userinfo userinfo_1 = null;
        QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_1 = null;
//virtualUsage 1-3-09查询部门详情  15989
        Dept dept = null;
        QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
        if (reqDto != null) {
            queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:12515_1_15989
            queryDeptDetailReq.setDeptCode(reqDto.getDeptCode());//SimpleFieldAssign//sourceId:39716_1_15989
            queryDeptDetailReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:39718_1_15989
            queryDeptDetailReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:35482_1_15989
        }

        /*1-3-09查询部门详情[218]   */

        dept = mDeptService.queryDeptDetail(queryDeptDetailReq)/*vcase invoke 本地 method 方法调用;*/;

        dept_1 = dept;
//virtualUsage D1修订底层变更字段(公共)  48902
        ReviseBaseChangeColComRespDto reviseBaseChangeColComRespDto = null;
        if (dept != null) {
            ReviseBaseChangeColComReqDto reviseBaseChangeColComReqDto = new ReviseBaseChangeColComReqDto();
            reviseBaseChangeColComReqDto.setTableTypeCode("OMS_ORG_DEPT");//sourceId:308310_1_48902
            if (reqDto != null) {
                reviseBaseChangeColComReqDto.setEntityId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:308311_1_48902
            }
            if (dept != null) {
                reviseBaseChangeColComReqDto.setDeptNumber(dept.getDeptNumber());//SimpleFieldAssign//sourceId:308320_1_48902
                reviseBaseChangeColComReqDto.setDeptName(dept.getDeptName());//SimpleFieldAssign//sourceId:308321_1_48902
                reviseBaseChangeColComReqDto.setDeptEnName(dept.getDeptEnName());//SimpleFieldAssign//sourceId:308322_1_48902
                reviseBaseChangeColComReqDto.setDeptShortName(dept.getDeptShortName());//SimpleFieldAssign//sourceId:308323_1_48902
                reviseBaseChangeColComReqDto.setDeptDutyDesc(dept.getDeptDutyDesc());//SimpleFieldAssign//sourceId:308324_1_48902
                reviseBaseChangeColComReqDto.setDeptTargetDesc(dept.getDeptTargetDesc());//SimpleFieldAssign//sourceId:308325_1_48902
                reviseBaseChangeColComReqDto.setDirectorIdCardName(dept.getDirectorIdCardName());//SimpleFieldAssign//sourceId:308319_1_48902
                reviseBaseChangeColComReqDto.setPartyAndYouthDirectorIdCardName(dept.getPartyAndYouthDirectorIdCardName());//SimpleFieldAssign//sourceId:1135278_1_48902
                reviseBaseChangeColComReqDto.setRoleMemberId(dept.getRoleMemberId());//SimpleFieldAssign//sourceId:308318_1_48902
            }

            /*D1修订底层变更字段(公共)[3921]   */
            Assert.isNull(reviseBaseChangeColComReqDto.getTableTypeCode(), "D1-3查询部门设置详情(管理)-D1修订底层变更字段(公共)-内容表类型编码不能为空", false);
            Assert.isNull(reviseBaseChangeColComReqDto.getEntityId(), "D1-3查询部门设置详情(管理)-D1修订底层变更字段(公共)-内容表主键ID不能为空", false);
            reviseBaseChangeColComRespDto = changeColumnService.reviseBaseChangeColCom(reviseBaseChangeColComReqDto)/*vcase invoke isSameApp*/;


            reviseBaseChangeColComRespDto_1 = reviseBaseChangeColComRespDto;
        }
        if ((reviseBaseChangeColComRespDto != null && reviseBaseChangeColComRespDto.getRoleMemberId() != null)) {
            //if(D1修订底层变更字段(公共).可选分管领导角色成员ID 值不等于空 )  16068

            RoleMember roleMember = null;
            if (reviseBaseChangeColComRespDto != null) {
                QueryRoleRelDetailReq queryRoleRelDetailReq = new QueryRoleRelDetailReq();
                queryRoleRelDetailReq.setRelationshipValid("FALSE");//sourceId:49770_1_16069
                queryRoleRelDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:49767_1_16069
                if (reviseBaseChangeColComRespDto != null) {
                    queryRoleRelDetailReq.setRoleMemberId(reviseBaseChangeColComRespDto.getRoleMemberId());//SimpleFieldAssign//sourceId:29563_1_16069
                }

                /*1-2-13查询角色人员详情（查询分管领导）[335]   */
                Assert.isNull(queryRoleRelDetailReq.getRoleMemberId(), "D1-3查询部门设置详情(管理)-1-2-13查询角色人员详情（查询分管领导）-角色人员ID不能为空", false);
                Assert.isNull(queryRoleRelDetailReq.getRelationshipValid(), "D1-3查询部门设置详情(管理)-1-2-13查询角色人员详情（查询分管领导）-是否失效不能为空", false);
                Assert.isNull(queryRoleRelDetailReq.getSubjectLifeCycle(), "D1-3查询部门设置详情(管理)-1-2-13查询角色人员详情（查询分管领导）-主体生命周期不能为空", false);
                roleMember = mRoleMemberService.queryRoleRelDetail(queryRoleRelDetailReq)/*vcase invoke 本地 method 方法调用;*/;
                Assert.isTrue(roleMember == null || roleMember.getUserId() == null, "找不到数据，系统异常", false);


            }
            Userinfo userinfo = null;
            if (roleMember != null) {
                QueryUserinfoDetailReq queryUserinfoDetailReq = new QueryUserinfoDetailReq();
                if (roleMember != null) {
                    queryUserinfoDetailReq.setUserId(roleMember.getUserId());//SimpleFieldAssign//sourceId:29636_1_16070
                }

                /*1-2-02查询个人资料详情（查询分管领导）[155]   */
                Assert.isNull(queryUserinfoDetailReq.getUserId(), "D1-3查询部门设置详情(管理)-1-2-02查询个人资料详情（查询分管领导）-账号不能为空", false);
                userinfo = mUserinfoService.queryUserinfoDetail(queryUserinfoDetailReq)/*vcase invoke 本地 method 方法调用;*/;
                Assert.isTrue(userinfo == null || userinfo.getIdCardName() == null, "找不到数据，系统异常", false);

                userinfo_1 = userinfo;
            }
        }
        if ((dept != null && dept.getDeptBusinessIdentity() != null)) {
            //if(1-3-09查询部门详情.部门业务身份 值不等于空 )  72429

            QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto = null;
            if (dept != null) {
                QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto = new QueryConfItemMatchAnswerDetailComReqDto();
                queryConfItemMatchAnswerDetailComReqDto.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1984002_1_72430
                queryConfItemMatchAnswerDetailComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:1984001_1_72430
                queryConfItemMatchAnswerDetailComReqDto.setConfItemCode("DEPT_BUSINESS_IDENTITY");//CUSTOM_CONVENTION//sourceId:1984000_1_72430
                queryConfItemMatchAnswerDetailComReqDto.setIsPlatData("FALSE");//sourceId:1984009_1_72430
                if (dept != null) {
                    queryConfItemMatchAnswerDetailComReqDto.setEndValue(dept.getDeptBusinessIdentity());//SimpleFieldAssign//sourceId:1984020_1_72430
                }

                /*D2查部门业务身份类型配置名称（公共）[2486]   */
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getResultAspObjId(), "D1-3查询部门设置详情(管理)-D2查部门业务身份类型配置名称（公共）-开通对象ID不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getEndValue(), "D1-3查询部门设置详情(管理)-D2查部门业务身份类型配置名称（公共）-答案值不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getResultAspObjType(), "D1-3查询部门设置详情(管理)-D2查部门业务身份类型配置名称（公共）-开通对象类型编码不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getIsPlatData(), "D1-3查询部门设置详情(管理)-D2查部门业务身份类型配置名称（公共）-是否标准答案不能为空", false);
                queryConfItemMatchAnswerDetailComRespDto = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                queryConfItemMatchAnswerDetailComRespDto_1 = queryConfItemMatchAnswerDetailComRespDto;
            }
        }
        QueryDeptSetDetailRespDto retData = new QueryDeptSetDetailRespDto();
        if (dept_1 != null) {
            retData.setDeptId(dept_1.getDeptId());//SimpleFieldAssign//sourceId:12555_1
            retData.setTypeDictionaryId(dept_1.getTypeDictionaryId());//SimpleFieldAssign//sourceId:417691_1
            retData.setDeptCode(dept_1.getDeptCode());//SimpleFieldAssign//sourceId:104499_1
            retData.setSubjectLifeCycle(dept_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:35506_1
            retData.setIsDirectlyMember(dept_1.getIsDirectlyMember());//SimpleFieldAssign//sourceId:157762_1
            retData.setIsCreateLowerDept(dept_1.getIsCreateLowerDept());//SimpleFieldAssign//sourceId:158231_1
            retData.setDeptBusinessIdentity(dept_1.getDeptBusinessIdentity());//SimpleFieldAssign//sourceId:1984021_1
            retData.setOrderNumber(dept_1.getOrderNumber());//SimpleFieldAssign//sourceId:160200_1
            retData.setOperationInductionId(dept_1.getOperationInductionId());//SimpleFieldAssign//sourceId:35508_1
            retData.setOperateTime(dept_1.getOperateTime());//SimpleFieldAssign//sourceId:35509_1
        }
        if (reviseBaseChangeColComRespDto_1 != null) {
            retData.setDeptNumber(reviseBaseChangeColComRespDto_1.getDeptNumber());//SimpleFieldAssign//sourceId:1135310_1
            retData.setDeptShortName(reviseBaseChangeColComRespDto_1.getDeptShortName());//SimpleFieldAssign//sourceId:1135313_1
            retData.setDeptName(reviseBaseChangeColComRespDto_1.getDeptName());//SimpleFieldAssign//sourceId:1135311_1
            retData.setDeptEnName(reviseBaseChangeColComRespDto_1.getDeptEnName());//SimpleFieldAssign//sourceId:1135312_1
            retData.setDeptDutyDesc(reviseBaseChangeColComRespDto_1.getDeptDutyDesc());//SimpleFieldAssign//sourceId:1135314_1
            retData.setDeptTargetDesc(reviseBaseChangeColComRespDto_1.getDeptTargetDesc());//SimpleFieldAssign//sourceId:1135315_1
            retData.setDirectorIdCardName(reviseBaseChangeColComRespDto_1.getDirectorIdCardName());//SimpleFieldAssign//sourceId:1135308_1
            retData.setPartyAndYouthDirectorIdCardName(reviseBaseChangeColComRespDto_1.getPartyAndYouthDirectorIdCardName());//SimpleFieldAssign//sourceId:1135309_1
            retData.setRoleMemberId(reviseBaseChangeColComRespDto_1.getRoleMemberId());//SimpleFieldAssign//sourceId:1135307_1
        }
        if (userinfo_1 != null) {
            retData.setIdCardName(userinfo_1.getIdCardName());//SimpleFieldAssign//sourceId:29690_1
            retData.setNickName(userinfo_1.getNickName());//SimpleFieldAssign//sourceId:29691_1
            retData.setUserFace(userinfo_1.getUserFace());//SimpleFieldAssign//sourceId:146028_1
        }
        if (queryConfItemMatchAnswerDetailComRespDto_1 != null) {
            retData.setDeptBusinessIdentityName(queryConfItemMatchAnswerDetailComRespDto_1.getConfOptionName());//SimpleFieldAssign//sourceId:1984022_1
        }


        return retData;
    }

    /**
     * D1-3查询部门边界(公共)[4108]
     * gen by moon at 9/19/2022, 7:18:51 PM
     */
    @Trace(operationName = "D1-3查询部门边界(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptBorderDetailComRespDto queryDeptBorderDetailCom(QueryDeptBorderDetailComReqDto reqDto) {


        Dept dept_1 = null;
//步骤0: 1-3-09查询部门详情 - queryDeptDetail
        Dept dept = null;
        QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
        queryDeptDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:230160_1
        if (reqDto != null) {
            queryDeptDetailReq.setDeptId(reqDto.getDeptId());//sourceId:230138_1
            queryDeptDetailReq.setDeptCode(reqDto.getDeptCode());//sourceId:230163_1
            queryDeptDetailReq.setOrganizationId(reqDto.getOrganizationId());//sourceId:230166_1
        }

        /*1-3-09查询部门详情[218]   */
        Assert.isNull(queryDeptDetailReq.getOrganizationId(), "D1-3查询部门边界(公共)-1-3-09查询部门详情-组织ID不能为空", false);
        Assert.isNull(queryDeptDetailReq.getSubjectLifeCycle(), "D1-3查询部门边界(公共)-1-3-09查询部门详情-主体生命周期不能为空", false);
        dept = mDeptService.queryDeptDetail(queryDeptDetailReq);


        dept_1 = dept;

        QueryDeptBorderDetailComRespDto retData = new QueryDeptBorderDetailComRespDto();
        if (dept_1 != null) {
            retData.setDeptId(dept_1.getDeptId());//sourceId:230182_1
            retData.setDeptCode(dept_1.getDeptCode());//sourceId:230183_1
            retData.setDeptShortName(dept_1.getDeptShortName());//sourceId:230184_1
        }


        return retData;
    }

    /**
     * D1-3批量查询责任主体部门[4102]
     * gen by moon at 5/2/2023, 6:10:57 PM
     */
    @Trace(operationName = "D1-3批量查询责任主体部门")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public BatchQueryDutyBodyDeptRespDto batchQueryDutyBodyDept(BatchQueryDutyBodyDeptReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
        ImplementAnalyseSubordinateDeptSituationComRespDto implementAnalyseSubordinateDeptSituationComRespDto_1 = null;
//virtualUsage 1-3-09批量查询部门列表  38584
        List<Dept> listDept = new ArrayList<>();
        BatchQueryDeptListReq batchQueryDeptListReq = new BatchQueryDeptListReq();
        batchQueryDeptListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:229748_1_38584
        batchQueryDeptListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:229758_1_38584
        if (reqDto != null) {
            batchQueryDeptListReq.setDeptList(reqDto.getDeptList());//list-field-assign//sourceId:229736_1_38584
            batchQueryDeptListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:229739_1_38584
        }

        /*1-3-09批量查询部门列表[1153]   */
        Assert.isNull(batchQueryDeptListReq.getOrganizationId(), "D1-3批量查询责任主体部门-1-3-09批量查询部门列表-组织ID不能为空", false);
        Assert.isNull(batchQueryDeptListReq.getSubjectLifeCycle(), "D1-3批量查询责任主体部门-1-3-09批量查询部门列表-主体生命周期不能为空", false);
        Assert.isNull(batchQueryDeptListReq.getSpaceId(), "D1-3批量查询责任主体部门-1-3-09批量查询部门列表-创建于空间ID不能为空", false);
        listDept = mDeptService.batchQueryDeptList(batchQueryDeptListReq)/*vcase invoke 本地 method 方法调用;*/;


        listDept_1 = listDept;
        if ((reqDto != null && reqDto.getDeptList() != null && reqDto.getDeptList().size() > 0)) {
            //if(D1-3批量查询责任主体部门.部门列表数据集条数 大于 0)  38585

            List<Dept> listDept_2 = new ArrayList<>();
            if (listDept != null && !CollectionUtil.isEmpty(listDept) && listDept.size() > 0) {
                BatchQuerySubordinateDirectlyDeptReq batchQuerySubordinateDirectlyDeptReq = new BatchQuerySubordinateDirectlyDeptReq();
                batchQuerySubordinateDirectlyDeptReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:229798_1_38586
                if (listDept != null && !CollectionUtil.isEmpty(listDept) && listDept != null && !CollectionUtil.isEmpty(listDept)) {
                    batchQuerySubordinateDirectlyDeptReq.setDeptList(listDept.stream().map(item -> item.getDeptId())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:229796_1_38586
                }
                if (reqDto != null) {
                    batchQuerySubordinateDirectlyDeptReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:229797_1_38586
                }

                /*1-3-09批量查询下级直属部门[4104]   */
                Assert.isNull(batchQuerySubordinateDirectlyDeptReq.getOrganizationId(), "D1-3批量查询责任主体部门-1-3-09批量查询下级直属部门-组织ID不能为空", false);
                Assert.isNull(batchQuerySubordinateDirectlyDeptReq.getSubjectLifeCycle(), "D1-3批量查询责任主体部门-1-3-09批量查询下级直属部门-主体生命周期不能为空", false);
                listDept_2 = mDeptService.batchQuerySubordinateDirectlyDept(batchQuerySubordinateDirectlyDeptReq)/*vcase invoke 本地 method 方法调用;*/;


            }
            ImplementAnalyseSubordinateDeptSituationComRespDto implementAnalyseSubordinateDeptSituationComRespDto = null;
            if (listDept != null && !CollectionUtil.isEmpty(listDept) && listDept.size() > 0) {
                ImplementAnalyseSubordinateDeptSituationComReqDto implementAnalyseSubordinateDeptSituationComReqDto = new ImplementAnalyseSubordinateDeptSituationComReqDto();
                if (listDept != null && !CollectionUtil.isEmpty(listDept) && listDept != null && !CollectionUtil.isEmpty(listDept)) {
                    implementAnalyseSubordinateDeptSituationComReqDto.setDeptList(listDept.stream().map(item -> item.getDeptId())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:874672_1_38587
                }
                if (listDept_2 != null && !CollectionUtil.isEmpty(listDept_2) && listDept_2 != null && !CollectionUtil.isEmpty(listDept_2)) {
                    implementAnalyseSubordinateDeptSituationComReqDto.setSubordinateDeptList(listDept_2.stream().map(item -> item.getParentDeptId())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:874673_1_38587
                }

                /*D1执行分析下属部门情况(公共)[6415]   */

                implementAnalyseSubordinateDeptSituationComRespDto = implementAnalyseSubordinateDeptSituationCom(implementAnalyseSubordinateDeptSituationComReqDto)/*vcase invoke 同服务,同domain*/;


                implementAnalyseSubordinateDeptSituationComRespDto_1 = implementAnalyseSubordinateDeptSituationComRespDto;
            }
        } else if ((listDept != null && listDept != null && listDept.size() == 0 && reqDto != null && reqDto.getDeptList() != null && reqDto.getDeptList().size() > 0)) {
            //elseif((1-3-09批量查询部门列表.部门列表数据集条数 等于 0 and D1-3批量查询责任主体部门.部门列表数据集条数 大于 0))  38588

//异常结束 38589
            throw new BizException("C00183", "对不起，找不到数据，所以报错！", false);
        }
        BatchQueryDutyBodyDeptRespDto retData = new BatchQueryDutyBodyDeptRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:229763_1
        if (implementAnalyseSubordinateDeptSituationComRespDto_1 != null) {
            retData.setSubordinateDivType(implementAnalyseSubordinateDeptSituationComRespDto_1.getSubordinateDivType());//SimpleFieldAssign//sourceId:874810_1
        }


        return retData;
    }

    /**
     * D1-3类型字典查部门树状结构列表[4687]
     * gen by moon at 10/15/2022, 5:39:01 PM
     */
    @Trace(operationName = "D1-3类型字典查部门树状结构列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryTypeFieldQueryDeptTreeTreeListRespDto queryTypeFieldQueryDeptTreeTreeList(QueryTypeFieldQueryDeptTreeTreeListReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
        Organization organization_3 = null;
//virtualUsage 1-3-12判断组织使用锁定状态  19463
        Organization organization = null;
        QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
        queryOrgDetailReq.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:377246_1_19463
        queryOrgDetailReq.setUsingLockStatus("UNLOCK");//sourceId:377264_1_19463
        queryOrgDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:377266_1_19463

        /*1-3-12判断组织使用锁定状态[201]   */
        Assert.isNull(queryOrgDetailReq.getOrganizationId(), "D1-3类型字典查部门树状结构列表-1-3-12判断组织使用锁定状态-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailReq.getUsingLockStatus(), "D1-3类型字典查部门树状结构列表-1-3-12判断组织使用锁定状态-使用锁定状态不能为空", false);
        Assert.isNull(queryOrgDetailReq.getSubjectLifeCycle(), "D1-3类型字典查部门树状结构列表-1-3-12判断组织使用锁定状态-主体生命周期不能为空", false);
        organization = mOrganizationService.queryOrgDetail(queryOrgDetailReq);


        if ((organization != null)) {
            //if(1-3-12判断组织使用锁定状态.出参 值不等于空 )  19457

            List<Dept> listDept = new ArrayList<>();
            if (organization != null) {
                QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
                queryDeptListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:341651_1_19458
                if (reqDto != null) {
                    queryDeptListReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:341647_1_19458
                }
                if (organization != null) {
                    queryDeptListReq.setOrganizationId(organization.getOrganizationId());//SimpleFieldAssign//sourceId:341649_1_19458
                }

                /*1-3-09查询部门列表[217]   */
                Assert.isNull(queryDeptListReq.getTypeDictionaryId(), "D1-3类型字典查部门树状结构列表-1-3-09查询部门列表-部门类型字典ID不能为空", false);
                Assert.isNull(queryDeptListReq.getOrganizationId(), "D1-3类型字典查部门树状结构列表-1-3-09查询部门列表-组织ID不能为空", false);
                Assert.isNull(queryDeptListReq.getSubjectLifeCycle(), "D1-3类型字典查部门树状结构列表-1-3-09查询部门列表-主体生命周期不能为空", false);
                listDept = mDeptService.queryDeptList(queryDeptListReq);


                listDept_1 = listDept;
            }
        } else {
            //else  19459

            Organization organization_2 = null;
            QueryOrgDetailReq queryOrgDetailReq_1 = new QueryOrgDetailReq();
            queryOrgDetailReq_1.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:377224_1_19460
            queryOrgDetailReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:377244_1_19460

            /*1-3-12查询组织架构使用锁定原因[201]   */
            Assert.isNull(queryOrgDetailReq_1.getOrganizationId(), "D1-3类型字典查部门树状结构列表-1-3-12查询组织架构使用锁定原因-组织ID不能为空", false);
            Assert.isNull(queryOrgDetailReq_1.getSubjectLifeCycle(), "D1-3类型字典查部门树状结构列表-1-3-12查询组织架构使用锁定原因-主体生命周期不能为空", false);
            organization_2 = mOrganizationService.queryOrgDetail(queryOrgDetailReq_1);


            organization_3 = organization_2;
        }
//processBranchName:正常结束 ,processBranchId:19462

        QueryTypeFieldQueryDeptTreeTreeListRespDto retData = new QueryTypeFieldQueryDeptTreeTreeListRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:341657_1
        if (organization_3 != null) {
            retData.setReasonOfUsingLock(organization_3.getReasonOfUsingLock());//SimpleFieldAssign//sourceId:377269_1
        }


        return retData;
    }

    /**
     * D1-3部门ID查直属部门列表[4688]
     * gen by moon at 10/15/2022, 5:39:03 PM
     */
    @Trace(operationName = "D1-3部门ID查直属部门列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySuperiorDeptDirectlyDeptListRespDto querySuperiorDeptDirectlyDeptList(QuerySuperiorDeptDirectlyDeptListReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
        Organization organization_3 = null;
//virtualUsage 1-3-12判断组织架构使用锁定状态  19504
        Organization organization = null;
        QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
        queryOrgDetailReq.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:341552_1_19504
        queryOrgDetailReq.setUsingLockStatus("UNLOCK");//sourceId:341570_1_19504
        queryOrgDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:341572_1_19504

        /*1-3-12判断组织架构使用锁定状态[201]   */
        Assert.isNull(queryOrgDetailReq.getOrganizationId(), "D1-3部门ID查直属部门列表-1-3-12判断组织架构使用锁定状态-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailReq.getUsingLockStatus(), "D1-3部门ID查直属部门列表-1-3-12判断组织架构使用锁定状态-使用锁定状态不能为空", false);
        Assert.isNull(queryOrgDetailReq.getSubjectLifeCycle(), "D1-3部门ID查直属部门列表-1-3-12判断组织架构使用锁定状态-主体生命周期不能为空", false);
        organization = mOrganizationService.queryOrgDetail(queryOrgDetailReq);


        if ((organization != null)) {
            //if(1-3-12判断组织架构使用锁定状态.出参 值不等于空 )  19505

            List<Dept> listDept = new ArrayList<>();
            QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
            queryDeptListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:341578_1_19506
            if (reqDto != null) {
                queryDeptListReq.setParentDeptId(reqDto.getParentDeptId());//SimpleFieldAssign//sourceId:341575_1_19506
            }

            /*1-3-09查询部门列表[217]   */
            Assert.isNull(queryDeptListReq.getParentDeptId(), "D1-3部门ID查直属部门列表-1-3-09查询部门列表-父级部门ID不能为空", false);
            Assert.isNull(queryDeptListReq.getSubjectLifeCycle(), "D1-3部门ID查直属部门列表-1-3-09查询部门列表-主体生命周期不能为空", false);
            listDept = mDeptService.queryDeptList(queryDeptListReq);


            listDept_1 = listDept;
        } else if ((organization == null)) {
            //elseif(1-3-12判断组织架构使用锁定状态.出参 值等于空 )  19507

            Organization organization_2 = null;
            QueryOrgDetailReq queryOrgDetailReq_1 = new QueryOrgDetailReq();
            queryOrgDetailReq_1.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:377630_1_19508
            queryOrgDetailReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:377631_1_19508

            /*1-3-12查询组织架构使用锁定原因[201]   */
            Assert.isNull(queryOrgDetailReq_1.getOrganizationId(), "D1-3部门ID查直属部门列表-1-3-12查询组织架构使用锁定原因-组织ID不能为空", false);
            Assert.isNull(queryOrgDetailReq_1.getSubjectLifeCycle(), "D1-3部门ID查直属部门列表-1-3-12查询组织架构使用锁定原因-主体生命周期不能为空", false);
            organization_2 = mOrganizationService.queryOrgDetail(queryOrgDetailReq_1);


            organization_3 = organization_2;
        }
//processBranchName:正常结束 ,processBranchId:19510

        QuerySuperiorDeptDirectlyDeptListRespDto retData = new QuerySuperiorDeptDirectlyDeptListRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:341584_1
        if (organization_3 != null) {
            retData.setReasonOfUsingLock(organization_3.getReasonOfUsingLock());//SimpleFieldAssign//sourceId:377633_1
        }


        return retData;
    }

    /**
     * D1-3类型字典查直属部门列表[4690]
     * gen by moon at 10/15/2022, 5:39:06 PM
     */
    @Trace(operationName = "D1-3类型字典查直属部门列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryTypeFieldDirectlyDeptListRespDto queryTypeFieldDirectlyDeptList(QueryTypeFieldDirectlyDeptListReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
        Organization organization_3 = null;
//virtualUsage 1-3-12判断组织架构使用锁定状态  19497
        Organization organization = null;
        QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
        queryOrgDetailReq.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:341591_1_19497
        queryOrgDetailReq.setUsingLockStatus("UNLOCK");//sourceId:341609_1_19497
        queryOrgDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:341611_1_19497

        /*1-3-12判断组织架构使用锁定状态[201]   */
        Assert.isNull(queryOrgDetailReq.getOrganizationId(), "D1-3类型字典查直属部门列表-1-3-12判断组织架构使用锁定状态-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailReq.getUsingLockStatus(), "D1-3类型字典查直属部门列表-1-3-12判断组织架构使用锁定状态-使用锁定状态不能为空", false);
        Assert.isNull(queryOrgDetailReq.getSubjectLifeCycle(), "D1-3类型字典查直属部门列表-1-3-12判断组织架构使用锁定状态-主体生命周期不能为空", false);
        organization = mOrganizationService.queryOrgDetail(queryOrgDetailReq);


        if ((organization != null)) {
            //if(1-3-12判断组织架构使用锁定状态.出参 值不等于空 )  19498

            List<Dept> listDept = new ArrayList<>();
            if (organization != null) {
                QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
                queryDeptListReq.setLevelNumber(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:341616_1_19499
                queryDeptListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:341617_1_19499
                if (reqDto != null) {
                    queryDeptListReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:341613_1_19499
                }
                if (organization != null) {
                    queryDeptListReq.setOrganizationId(organization.getOrganizationId());//SimpleFieldAssign//sourceId:341615_1_19499
                }

                /*1-3-09查询部门列表[217]   */
                Assert.isNull(queryDeptListReq.getTypeDictionaryId(), "D1-3类型字典查直属部门列表-1-3-09查询部门列表-部门类型字典ID不能为空", false);
                Assert.isNull(queryDeptListReq.getOrganizationId(), "D1-3类型字典查直属部门列表-1-3-09查询部门列表-组织ID不能为空", false);
                Assert.isNull(queryDeptListReq.getLevelNumber(), "D1-3类型字典查直属部门列表-1-3-09查询部门列表-层级不能为空", false);
                Assert.isNull(queryDeptListReq.getSubjectLifeCycle(), "D1-3类型字典查直属部门列表-1-3-09查询部门列表-主体生命周期不能为空", false);
                listDept = mDeptService.queryDeptList(queryDeptListReq);


                listDept_1 = listDept;
            }
        } else if ((organization == null)) {
            //elseif(1-3-12判断组织架构使用锁定状态.出参 值等于空 )  19500

            Organization organization_2 = null;
            QueryOrgDetailReq queryOrgDetailReq_1 = new QueryOrgDetailReq();
            queryOrgDetailReq_1.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:377584_1_19501
            queryOrgDetailReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:377604_1_19501

            /*1-3-12查询组织架构使用锁定原因[201]   */
            Assert.isNull(queryOrgDetailReq_1.getOrganizationId(), "D1-3类型字典查直属部门列表-1-3-12查询组织架构使用锁定原因-组织ID不能为空", false);
            Assert.isNull(queryOrgDetailReq_1.getSubjectLifeCycle(), "D1-3类型字典查直属部门列表-1-3-12查询组织架构使用锁定原因-主体生命周期不能为空", false);
            organization_2 = mOrganizationService.queryOrgDetail(queryOrgDetailReq_1);


            organization_3 = organization_2;
        }
//processBranchName:正常结束 ,processBranchId:19503

        QueryTypeFieldDirectlyDeptListRespDto retData = new QueryTypeFieldDirectlyDeptListRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:341623_1
        if (organization_3 != null) {
            retData.setReasonOfUsingLock(organization_3.getReasonOfUsingLock());//SimpleFieldAssign//sourceId:377606_1
        }


        return retData;
    }

    /**
     * D1-3部门ID查部门树状结构[4692]
     * gen by moon at 10/15/2022, 5:39:08 PM
     */
    @Trace(operationName = "D1-3部门ID查部门树状结构")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySuperiorDeptQueryDeptTreeTreeListRespDto querySuperiorDeptQueryDeptTreeTreeList(QuerySuperiorDeptQueryDeptTreeTreeListReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
        Organization organization_3 = null;
//virtualUsage 1-3-12判断组织架构使用锁定状态  19493
        Organization organization = null;
        QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
        queryOrgDetailReq.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:341981_1_19493
        queryOrgDetailReq.setUsingLockStatus("UNLOCK");//sourceId:342003_1_19493
        queryOrgDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:342001_1_19493

        /*1-3-12判断组织架构使用锁定状态[201]   */
        Assert.isNull(queryOrgDetailReq.getOrganizationId(), "D1-3部门ID查部门树状结构-1-3-12判断组织架构使用锁定状态-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailReq.getUsingLockStatus(), "D1-3部门ID查部门树状结构-1-3-12判断组织架构使用锁定状态-使用锁定状态不能为空", false);
        Assert.isNull(queryOrgDetailReq.getSubjectLifeCycle(), "D1-3部门ID查部门树状结构-1-3-12判断组织架构使用锁定状态-主体生命周期不能为空", false);
        organization = mOrganizationService.queryOrgDetail(queryOrgDetailReq);


        if ((organization != null)) {
            //if(1-3-12查询组织详情.出参 值不等于空 )  19494

            Dept dept = null;
            if (organization != null) {
                QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
                queryDeptDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:342321_1_19495
                if (reqDto != null) {
                    queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:342299_1_19495
                }
                if (organization != null) {
                    queryDeptDetailReq.setOrganizationId(organization.getOrganizationId());//SimpleFieldAssign//sourceId:342327_1_19495
                }

                /*1-3-09查询当前部门标识[218]   */
                Assert.isNull(queryDeptDetailReq.getDeptId(), "D1-3部门ID查部门树状结构-1-3-09查询当前部门标识-部门ID不能为空", false);
                Assert.isNull(queryDeptDetailReq.getOrganizationId(), "D1-3部门ID查部门树状结构-1-3-09查询当前部门标识-组织ID不能为空", false);
                Assert.isNull(queryDeptDetailReq.getSubjectLifeCycle(), "D1-3部门ID查部门树状结构-1-3-09查询当前部门标识-主体生命周期不能为空", false);
                dept = mDeptService.queryDeptDetail(queryDeptDetailReq);


            }
            List<Dept> listDept = new ArrayList<>();
            if (dept != null && organization != null) {
                QueryDeptTreeListReq queryDeptTreeListReq = new QueryDeptTreeListReq();
                queryDeptTreeListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:377875_1_19525
                queryDeptTreeListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:377880_1_19525
                if (dept != null) {
                    queryDeptTreeListReq.setDeptCode(dept.getDeptCode());//SimpleFieldAssign//sourceId:377872_1_19525
                }
                if (organization != null) {
                    queryDeptTreeListReq.setOrganizationId(organization.getOrganizationId());//SimpleFieldAssign//sourceId:377879_1_19525
                }

                /*1-3-09查询部门树状结构列表[1846]   */
                Assert.isNull(queryDeptTreeListReq.getDeptCode(), "D1-3部门ID查部门树状结构-1-3-09查询部门树状结构列表-部门标识不能为空", false);
                Assert.isNull(queryDeptTreeListReq.getOrganizationId(), "D1-3部门ID查部门树状结构-1-3-09查询部门树状结构列表-组织ID不能为空", false);
                Assert.isNull(queryDeptTreeListReq.getSubjectLifeCycle(), "D1-3部门ID查部门树状结构-1-3-09查询部门树状结构列表-主体生命周期不能为空", false);
                Assert.isNull(queryDeptTreeListReq.getSpaceId(), "D1-3部门ID查部门树状结构-1-3-09查询部门树状结构列表-创建于空间ID不能为空", false);
                listDept = mDeptService.queryDeptTreeList(queryDeptTreeListReq);


                listDept_1 = listDept;
            }
        } else if ((organization == null)) {
            //elseif(1-3-12判断组织架构使用锁定状态.出参 值等于空 )  19518

            Organization organization_2 = null;
            QueryOrgDetailReq queryOrgDetailReq_1 = new QueryOrgDetailReq();
            queryOrgDetailReq_1.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:377852_1_19519
            queryOrgDetailReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:377853_1_19519

            /*1-3-12查询组织架构使用锁定原因[201]   */
            Assert.isNull(queryOrgDetailReq_1.getOrganizationId(), "D1-3部门ID查部门树状结构-1-3-12查询组织架构使用锁定原因-组织ID不能为空", false);
            Assert.isNull(queryOrgDetailReq_1.getSubjectLifeCycle(), "D1-3部门ID查部门树状结构-1-3-12查询组织架构使用锁定原因-主体生命周期不能为空", false);
            organization_2 = mOrganizationService.queryOrgDetail(queryOrgDetailReq_1);


            organization_3 = organization_2;
        }
//processBranchName:正常结束 ,processBranchId:19521

        QuerySuperiorDeptQueryDeptTreeTreeListRespDto retData = new QuerySuperiorDeptQueryDeptTreeTreeListRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptListDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:377881_1
        if (organization_3 != null) {
            retData.setReasonOfUsingLock(organization_3.getReasonOfUsingLock());//SimpleFieldAssign//sourceId:377882_1
        }


        return retData;
    }

    /**
     * D1-3查询下级直属部门详情(公共)[4772]
     * gen by moon at 11/5/2022, 6:21:47 PM
     */
    @Trace(operationName = "D1-3查询下级直属部门详情(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySubordinateDirectlyDeptDetailComRespDto querySubordinateDirectlyDeptDetailCom(QuerySubordinateDirectlyDeptDetailComReqDto reqDto) {


        Dept dept_1 = null;
//步骤0: 1-3-1查询下级直属部门详情 - querySubordinateDirectlyDeptDetail
        Dept dept = null;
        QuerySubordinateDirectlyDeptDetailReq querySubordinateDirectlyDeptDetailReq = new QuerySubordinateDirectlyDeptDetailReq();
        if (reqDto != null) {
            querySubordinateDirectlyDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:414712_1
            querySubordinateDirectlyDeptDetailReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:364911_1
        }

        /*1-3-1查询下级直属部门详情[4773]   */

        dept = mDeptService.querySubordinateDirectlyDeptDetail(querySubordinateDirectlyDeptDetailReq);


        dept_1 = dept;

        QuerySubordinateDirectlyDeptDetailComRespDto retData = new QuerySubordinateDirectlyDeptDetailComRespDto();
        if (dept_1 != null) {
            retData.setDeptId(dept_1.getDeptId());//SimpleFieldAssign//sourceId:364912_1
            retData.setIsCreateLowerDept(dept_1.getIsCreateLowerDept());//SimpleFieldAssign//sourceId:364913_1
        }


        return retData;
    }

    /**
     * D1判断组织架构维护状态[4925]
     * gen by moon at 10/16/2022, 10:12:28 PM
     */
    @Trace(operationName = "D1判断组织架构维护状态")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public JudgeOrgMaintenanceStatusRespDto judgeOrgMaintenanceStatus(JudgeOrgMaintenanceStatusReqDto reqDto) {


        Organization organization_1 = null;
        Organization organization_3 = null;
        if ((reqDto != null && reqDto.getOrganizationId() != null)) {
            //if(D1判断组织架构维护状态.组织ID 值不等于空 )  19649

            Organization organization = null;
            QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
            queryOrgDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:381169_1_19650
            queryOrgDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:381170_1_19650
            if (reqDto != null) {
                queryOrgDetailReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:381168_1_19650
            }

            /*1-3-12查询组织（前端入参）[201]   */
            Assert.isNull(queryOrgDetailReq.getSubjectLifeCycle(), "D1判断组织架构维护状态-1-3-12查询组织（前端入参）-主体生命周期不能为空", false);
            Assert.isNull(queryOrgDetailReq.getSpaceId(), "D1判断组织架构维护状态-1-3-12查询组织（前端入参）-创建于空间ID不能为空", false);
            organization = mOrganizationService.queryOrgDetail(queryOrgDetailReq);
            Assert.isTrue(organization == null || organization.getUsingLockStatus() == null, "找不到数据，系统异常", false);

            organization_1 = organization;
//processBranchName:正常结束 ,processBranchId:19654

        } else {
            //else  19651

            Organization organization_2 = null;
            QueryOrgDetailReq queryOrgDetailReq_1 = new QueryOrgDetailReq();
            queryOrgDetailReq_1.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:381173_1_19652
            queryOrgDetailReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:381174_1_19652
            queryOrgDetailReq_1.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:381175_1_19652

            /*1-3-12查询组织（固化入参）[201]   */
            Assert.isNull(queryOrgDetailReq_1.getOrganizationId(), "D1判断组织架构维护状态-1-3-12查询组织（固化入参）-组织ID不能为空", false);
            Assert.isNull(queryOrgDetailReq_1.getSubjectLifeCycle(), "D1判断组织架构维护状态-1-3-12查询组织（固化入参）-主体生命周期不能为空", false);
            Assert.isNull(queryOrgDetailReq_1.getSpaceId(), "D1判断组织架构维护状态-1-3-12查询组织（固化入参）-创建于空间ID不能为空", false);
            organization_2 = mOrganizationService.queryOrgDetail(queryOrgDetailReq_1);
            Assert.isTrue(organization_2 == null || organization_2.getManageLockStatus() == null, "找不到数据，系统异常", false);

            organization_3 = organization_2;
//processBranchName:正常结束 ,processBranchId:19653

        }
        JudgeOrgMaintenanceStatusRespDto retData = new JudgeOrgMaintenanceStatusRespDto();
        if (organization_1 != null) {
            retData.setUsingLockStatus(organization_1.getUsingLockStatus());//SimpleFieldAssign//sourceId:381179_1
            retData.setReasonOfUsingLock(organization_1.getReasonOfUsingLock());//SimpleFieldAssign//sourceId:381180_1
        }
        if (organization_3 != null) {
            retData.setUsingLockStatus(organization_3.getManageLockStatus());//SimpleFieldAssign//sourceId:381179_1
            retData.setReasonOfUsingLock(organization_3.getReasonOfManageLock());//SimpleFieldAssign//sourceId:381180_1
        }


        return retData;
    }

    /**
     * D1-3执行一级部门判断(公共)[5216]
     * gen by moon at 12/19/2022, 5:11:09 PM
     */
    @Trace(operationName = "D1-3执行一级部门判断(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementFirstDeptJudgeComRespDto implementFirstDeptJudgeCom(ImplementFirstDeptJudgeComReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_1 = null;
//virtualUsage 1-3-09查询部门详情  21938
        Dept dept = null;
        QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
        queryDeptDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:440048_1_21938
        if (reqDto != null) {
            queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:440026_1_21938
        }

        /*1-3-09查询部门详情[218]   */
        Assert.isNull(queryDeptDetailReq.getDeptId(), "D1-3执行一级部门判断(公共)-1-3-09查询部门详情-部门ID不能为空", false);
        Assert.isNull(queryDeptDetailReq.getSubjectLifeCycle(), "D1-3执行一级部门判断(公共)-1-3-09查询部门详情-主体生命周期不能为空", false);
        dept = mDeptService.queryDeptDetail(queryDeptDetailReq);


        if ((dept != null && dept != null && dept.getLevelNumber() == 1L)) {
            //if((1-3-09查询部门详情.出参 值不等于空  and 1-3-09查询部门详情.层级 等于 1))  21939

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq.setOutputNum(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:440190_1_21940

            /*M1-传输数值（非空）[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq.getOutputNum(), "D1-3执行一级部门判断(公共)-M1-传输数值（非空）-传输数值（整数型）不能为空", false);
            receptionServiceRes = nbOrg.queryReceiveFieldDetail(receptionServiceReq);


            receptionServiceRes_1 = receptionServiceRes;
        } else if ((dept != null && dept != null && dept.getLevelNumber() > 1L)) {
            //elseif((1-3-09查询部门详情.出参 值不等于空  and 1-3-09查询部门详情.层级 大于 1))  21941

//异常结束 21942
            throw new BizException("10300145", "对不起！当前牵头部门不是一级部门，请重新选择~！", false);
        }
        ImplementFirstDeptJudgeComRespDto retData = new ImplementFirstDeptJudgeComRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setOutputNum(receptionServiceRes_1.getOutputNum());//SimpleFieldAssign//sourceId:440202_1
        }


        return retData;
    }

    /**
     * D1查询组织列表(公共)[5718]
     * gen by moon at 1/27/2023, 7:48:59 PM
     */
    @Trace(operationName = "D1查询组织列表(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryOrgListComRespDto queryOrgListCom(QueryOrgListComReqDto reqDto) {


        List<Organization> listOrganization_1 = new ArrayList<>();
        //步骤0: 1-3-12查询组织列表 - queryOrgList
        List<Organization> listOrganization = new ArrayList<>();
        QueryOrgListReq queryOrgListReq = new QueryOrgListReq();
        queryOrgListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:613120_1
        if (reqDto != null) {
            queryOrgListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:613121_1
        }

        /*1-3-12查询组织列表[200]   */
        Assert.isNull(queryOrgListReq.getSubjectLifeCycle(), "D1查询组织列表(公共)-1-3-12查询组织列表-主体生命周期不能为空", false);
        Assert.isNull(queryOrgListReq.getSpaceId(), "D1查询组织列表(公共)-1-3-12查询组织列表-创建于空间ID不能为空", false);
        listOrganization = mOrganizationService.queryOrgList(queryOrgListReq);


        listOrganization_1 = listOrganization;

        QueryOrgListComRespDto retData = new QueryOrgListComRespDto();
        retData.setOrgList(listOrganization_1.stream().map(item -> item.getOrganizationId())
                .collect(Collectors.toList()));/*list-to-strings*///sourceId:637663_1


        return retData;
    }

    /**
     * D1-2查询部门归属部门类型(公共)[5876]
     * gen by moon at 10/5/2023, 2:22:56 PM
     */
    @Trace(operationName = "D1-2查询部门归属部门类型(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptAffiliationDeptTypeDetailComRespDto queryDeptAffiliationDeptTypeDetailCom(QueryDeptAffiliationDeptTypeDetailComReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_1 = null;
//virtualUsage 1-3-09查询当前部门详情  29278
        Dept dept = null;
        QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
        queryDeptDetailReq.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOrganizationId());//CURRENT_ORGID//sourceId:660828_1_29278
        queryDeptDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:660822_1_29278
        if (reqDto != null) {
            queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:660800_1_29278
        }

        /*1-3-09查询当前部门详情[218]   */
        Assert.isNull(queryDeptDetailReq.getDeptId(), "D1-2查询部门归属部门类型(公共)-1-3-09查询当前部门详情-部门ID不能为空", false);
        Assert.isNull(queryDeptDetailReq.getOrganizationId(), "D1-2查询部门归属部门类型(公共)-1-3-09查询当前部门详情-组织ID不能为空", false);
        Assert.isNull(queryDeptDetailReq.getSubjectLifeCycle(), "D1-2查询部门归属部门类型(公共)-1-3-09查询当前部门详情-主体生命周期不能为空", false);
        dept = mDeptService.queryDeptDetail(queryDeptDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        if ((dept != null && dept != null && dept.getLevelNumber() == 1L)) {
            //if((1-3-09查询当前部门详情.出参 值不等于空  and 1-3-09查询当前部门详情.层级 等于 1))  29279

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes = null;
            if (dept != null) {
                QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
                if (dept != null) {
                    receptionServiceReq.setTypeDictionaryId(dept.getTypeDictionaryId());//SimpleFieldAssign//sourceId:660967_1_29281
                }

                /*M1接收上文出参部门类型ID参数值[3715]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq.getTypeDictionaryId(), "D1-2查询部门归属部门类型(公共)-M1接收上文出参部门类型ID参数值-部门类型字典ID不能为空", false);
                receptionServiceRes = nbOrg.queryReceiveFieldDetail(receptionServiceReq);


                receptionServiceRes_1 = receptionServiceRes;
            }
        } else if ((dept != null && dept != null && dept.getLevelNumber() > 1L)) {
            //elseif((1-3-09查询当前部门详情.出参 值不等于空  and 1-3-09查询当前部门详情.层级 大于 1))  29282

            ImplementCutRetainStringComRespDto implementCutRetainStringComRespDto = null;
            if (dept != null) {
                ImplementCutRetainStringComReqDto implementCutRetainStringComReqDto = new ImplementCutRetainStringComReqDto();
                implementCutRetainStringComReqDto.setComNumField(Long.valueOf(8));//CUSTOM_CONVENTION//sourceId:1162332_1_29283
                if (dept != null) {
                    implementCutRetainStringComReqDto.setOriginalString(dept.getDeptCode());//SimpleFieldAssign//sourceId:660983_1_29283
                }

                /*D2执行截取字符串保留前N个字符(公共)[5878]   */
                Assert.isNull(implementCutRetainStringComReqDto.getOriginalString(), "D1-2查询部门归属部门类型(公共)-D2执行截取字符串保留前N个字符(公共)-原字符串不能为空", false);
                Assert.isNull(implementCutRetainStringComReqDto.getComNumField(), "D1-2查询部门归属部门类型(公共)-D2执行截取字符串保留前N个字符(公共)-通用数值字段（整数型）不能为空", false);
                implementCutRetainStringComRespDto = interfaceModeService.implementCutRetainStringCom(implementCutRetainStringComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            }
            Dept dept_2 = null;
            if (implementCutRetainStringComRespDto != null) {
                QueryDeptDetailReq queryDeptDetailReq_1 = new QueryDeptDetailReq();
                queryDeptDetailReq_1.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOrganizationId());//CURRENT_ORGID//sourceId:661021_1_29284
                queryDeptDetailReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:661020_1_29284
                if (implementCutRetainStringComRespDto != null) {
                    queryDeptDetailReq_1.setDeptCode(implementCutRetainStringComRespDto.getCutString());//SimpleFieldAssign//sourceId:661019_1_29284
                }

                /*1-3-09查询一级部门[218]   */
                Assert.isNull(queryDeptDetailReq_1.getDeptCode(), "D1-2查询部门归属部门类型(公共)-1-3-09查询一级部门-部门标识不能为空", false);
                Assert.isNull(queryDeptDetailReq_1.getOrganizationId(), "D1-2查询部门归属部门类型(公共)-1-3-09查询一级部门-组织ID不能为空", false);
                Assert.isNull(queryDeptDetailReq_1.getSubjectLifeCycle(), "D1-2查询部门归属部门类型(公共)-1-3-09查询一级部门-主体生命周期不能为空", false);
                dept_2 = mDeptService.queryDeptDetail(queryDeptDetailReq_1)/*vcase invoke 本地 method 方法调用;*/;


            }
//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_2 = null;
            if (dept_2 != null) {
                QueryReceiveFieldDetailReqDto receptionServiceReq_1 = new QueryReceiveFieldDetailReqDto();
                if (dept_2 != null) {
                    receptionServiceReq_1.setTypeDictionaryId(dept_2.getTypeDictionaryId());//SimpleFieldAssign//sourceId:660967_1_29285
                }

                /*M1接收上文出参部门类型ID参数值[3715]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_1.getTypeDictionaryId(), "D1-2查询部门归属部门类型(公共)-M1接收上文出参部门类型ID参数值-部门类型字典ID不能为空", false);
                receptionServiceRes_2 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_1);


                receptionServiceRes_1 = receptionServiceRes_2;
            }
        }
        QueryDeptAffiliationDeptTypeDetailComRespDto retData = new QueryDeptAffiliationDeptTypeDetailComRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setTypeDictionaryId(receptionServiceRes_1.getTypeDictionaryId());//SimpleFieldAssign//sourceId:661022_1
        }


        return retData;
    }

    /**
     * D1执行找祖先部门(公共)[6305]
     * gen by moon at 6/24/2023, 2:42:39 AM
     */
    @Trace(operationName = "D1执行找祖先部门(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementAncestorDeptComRespDto implementAncestorDeptCom(ImplementAncestorDeptComReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//virtualUsage D2执行找祖先标识(公共)  37224
        ImplementLookAncestorNodeCodeComRespDto implementLookAncestorNodeCodeComRespDto = null;
        ImplementLookAncestorNodeCodeComReqDto implementLookAncestorNodeCodeComReqDto = new ImplementLookAncestorNodeCodeComReqDto();
        if (reqDto != null) {
            implementLookAncestorNodeCodeComReqDto.setComCode(reqDto.getDeptCode());//SimpleFieldAssign//sourceId:837249_1_37224
        }

        /*D2执行找祖先标识(公共)[6307]   */
        Assert.isNull(implementLookAncestorNodeCodeComReqDto.getComCode(), "D1执行找祖先部门(公共)-D2执行找祖先标识(公共)-通用编码标识不能为空", false);
        implementLookAncestorNodeCodeComRespDto = interfaceModeService.implementLookAncestorNodeCodeCom(implementLookAncestorNodeCodeComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        if ((implementLookAncestorNodeCodeComRespDto != null && implementLookAncestorNodeCodeComRespDto.getLookAncestorNodeList() != null && implementLookAncestorNodeCodeComRespDto.getLookAncestorNodeList().size() > 1)) {
            //if(D2执行找祖先标识(公共).找祖先列表数据集条数 大于 1)  37225

            List<Dept> listDept = new ArrayList<>();
            if (implementLookAncestorNodeCodeComRespDto != null) {
                BatchQueryDeptByCodeReq batchQueryDeptByCodeReq = new BatchQueryDeptByCodeReq();
                batchQueryDeptByCodeReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:837258_1_37226
                if (implementLookAncestorNodeCodeComRespDto != null) {
                    batchQueryDeptByCodeReq.setDeptList(implementLookAncestorNodeCodeComRespDto.getLookAncestorNodeList());//list-field-assign//sourceId:837257_1_37226
                }

                /*1-3-09批量查询部门列表ByCode[6306]   */
                Assert.isNull(batchQueryDeptByCodeReq.getSubjectLifeCycle(), "D1执行找祖先部门(公共)-1-3-09批量查询部门列表ByCode-主体生命周期不能为空", false);
                listDept = mDeptService.batchQueryDeptByCode(batchQueryDeptByCodeReq)/*vcase invoke 本地 method 方法调用;*/;


                listDept_1 = listDept;
            }
        }
        ImplementAncestorDeptComRespDto retData = new ImplementAncestorDeptComRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:837392_1


        return retData;
    }

    /**
     * D1查询下级部门列表(公共)[6310]
     * gen by moon at 6/21/2023, 3:19:44 AM
     */
    @Trace(operationName = "D1查询下级部门列表(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySubordinateDeptListComRespDto querySubordinateDeptListCom(QuerySubordinateDeptListComReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_1 = null;
//virtualUsage D1-3查下级多层级部门  37235
        QuerySubordinateDeptTreeListComBorderRespDto querySubordinateDeptTreeListComBorderRespDto = null;
        QuerySubordinateDeptTreeListComBorderReqDto querySubordinateDeptTreeListComBorderReqDto = new QuerySubordinateDeptTreeListComBorderReqDto();
        querySubordinateDeptTreeListComBorderReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:837517_1_37235
        if (reqDto != null) {
            querySubordinateDeptTreeListComBorderReqDto.setDeptCode(reqDto.getDeptCode());//SimpleFieldAssign//sourceId:837515_1_37235
        }

        /*D1-3查下级多层级部门[1845]   */
        Assert.isNull(querySubordinateDeptTreeListComBorderReqDto.getDeptCode(), "D1查询下级部门列表(公共)-D1-3查下级多层级部门-部门标识不能为空", false);
        Assert.isNull(querySubordinateDeptTreeListComBorderReqDto.getSubjectLifeCycle(), "D1查询下级部门列表(公共)-D1-3查下级多层级部门-主体生命周期不能为空", false);
        querySubordinateDeptTreeListComBorderRespDto = querySubordinateDeptTreeListComBorder(querySubordinateDeptTreeListComBorderReqDto)/*vcase invoke 同服务,同domain*/;


        if ((reqDto != null && reqDto.getCustomField() != null && reqDto.getCustomField().equals("0"))) {
            //if(D1查询下级部门列表(公共).是否包含自身 等于 0)  37234

            ImplementDataFilterSpecRecByComRespDto implementDataFilterSpecRecByComRespDto = null;
            if (querySubordinateDeptTreeListComBorderRespDto != null) {
                ImplementDataFilterSpecRecByComReqDto implementDataFilterSpecRecByComReqDto = new ImplementDataFilterSpecRecByComReqDto();
                if (querySubordinateDeptTreeListComBorderRespDto != null && querySubordinateDeptTreeListComBorderRespDto.getDeptList() != null && !CollectionUtil.isEmpty(querySubordinateDeptTreeListComBorderRespDto.getDeptList())) {
                    implementDataFilterSpecRecByComReqDto.setDataFilterSpecRecByList(//objList-to-objLists
                            querySubordinateDeptTreeListComBorderRespDto.getDeptList().stream().map(item -> {
                                DataFilterSpecRecByDto elm = new DataFilterSpecRecByDto();
                                if (item != null) {
                                    elm.setCustomField(item.getDeptId());//SimpleFieldAssign//sourceId:183015_2_37236
                                    elm.setCustomField3(item.getDeptCode());//SimpleFieldAssign//sourceId:183028_2_37236
                                }
                                return elm;
                            }).collect(Collectors.toList()));//objList-to-objLists//sourceId:837522_1_37236
                }
                if (reqDto != null) {
                    implementDataFilterSpecRecByComReqDto.setCustomField3(reqDto.getDeptCode());//SimpleFieldAssign//sourceId:837526_1_37236
                }

                /*D2过滤当前部门自己[5477]   */
                Assert.isNull(implementDataFilterSpecRecByComReqDto.getCustomField3(), "D1查询下级部门列表(公共)-D2过滤当前部门自己-自定义字段3不能为空", false);
                implementDataFilterSpecRecByComRespDto = interfaceModeService.implementDataFilterSpecRecByCom(implementDataFilterSpecRecByComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            }
//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes = null;
            if (implementDataFilterSpecRecByComRespDto != null) {
                QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
                if (implementDataFilterSpecRecByComRespDto != null && implementDataFilterSpecRecByComRespDto.getDataFilterSpecRecByList() != null && !CollectionUtil.isEmpty(implementDataFilterSpecRecByComRespDto.getDataFilterSpecRecByList())) {
                    receptionServiceReq.setDeptList(//objList-to-objLists
                            implementDataFilterSpecRecByComRespDto.getDataFilterSpecRecByList().stream().map(item -> {
                                DeptDto elm = new DeptDto();
                                if (item != null) {
                                    elm.setDeptId(item.getCustomField());//SimpleFieldAssign//sourceId:183042_2_37238
                                    elm.setDeptCode(item.getCustomField3());//SimpleFieldAssign//sourceId:183043_2_37238
                                }
                                return elm;
                            }).collect(Collectors.toList()));//objList-to-objLists//sourceId:837801_1_37238
                }

                /*M1-接收上文出参部门数据集[3715]  用于特殊方法接收上游入参。 */

                receptionServiceRes = nbOrg.queryReceiveFieldDetail(receptionServiceReq);


                receptionServiceRes_1 = receptionServiceRes;
            }
        } else if ((reqDto != null && reqDto.getCustomField() != null && reqDto.getCustomField().equals("1"))) {
            //elseif(D1查询下级部门列表(公共).是否包含自身 等于 1)  37237

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_2 = null;
            if (querySubordinateDeptTreeListComBorderRespDto != null) {
                QueryReceiveFieldDetailReqDto receptionServiceReq_1 = new QueryReceiveFieldDetailReqDto();
                if (querySubordinateDeptTreeListComBorderRespDto != null && querySubordinateDeptTreeListComBorderRespDto.getDeptList() != null && !CollectionUtil.isEmpty(querySubordinateDeptTreeListComBorderRespDto.getDeptList())) {
                    receptionServiceReq_1.setDeptList(querySubordinateDeptTreeListComBorderRespDto.getDeptList().stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:837801_1_37239
                }

                /*M1-接收上文出参部门数据集[3715]  用于特殊方法接收上游入参。 */

                receptionServiceRes_2 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_1);


                receptionServiceRes_1 = receptionServiceRes_2;
            }
        }
        QuerySubordinateDeptListComRespDto retData = new QuerySubordinateDeptListComRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setDeptList(receptionServiceRes_1.getDeptList().stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:837802_1
        }


        return retData;
    }

    /**
     * D1-查询最高组织详情(公共)[6369]
     * gen by moon at 4/26/2023, 4:02:17 PM
     */
    @Trace(operationName = "D1-查询最高组织详情(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySupremeOrgDetailComRespDto querySupremeOrgDetailCom(QuerySupremeOrgDetailComReqDto reqDto) {


        Organization organization_1 = null;
//步骤0: 1-3-12查询组织详情 - queryOrgDetail
        Organization organization = null;
        QueryOrgDetailReq queryOrgDetailReq = new QueryOrgDetailReq();
        if (reqDto != null) {
            queryOrgDetailReq.setIsHighOrg(reqDto.getIsHighOrg());//SimpleFieldAssign//sourceId:862491_1
            queryOrgDetailReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:862505_1
            queryOrgDetailReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:862492_1
        }

        /*1-3-12查询组织详情[201]   */

        organization = mOrganizationService.queryOrgDetail(queryOrgDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        organization_1 = organization;

        QuerySupremeOrgDetailComRespDto retData = new QuerySupremeOrgDetailComRespDto();
        if (organization_1 != null) {
            retData.setOrganizationId(organization_1.getOrganizationId());//SimpleFieldAssign//sourceId:862515_1
            retData.setOrganizationName(organization_1.getOrganizationName());//SimpleFieldAssign//sourceId:862516_1
        }


        return retData;
    }

    /**
     * D1执行分析下属部门情况(公共)[6415]
     * gen by moon at 5/2/2023, 11:40:36 AM
     */
    @Trace(operationName = "D1执行分析下属部门情况(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementAnalyseSubordinateDeptSituationComRespDto implementAnalyseSubordinateDeptSituationCom(ImplementAnalyseSubordinateDeptSituationComReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_3 = null;
//virtualUsage D2上级部门去除下级父级部门  38572
        ImplementTwoDataRemovalExistsComRespDto implementTwoDataRemovalExistsComRespDto = null;
        ImplementTwoDataRemovalExistsComReqDto implementTwoDataRemovalExistsComReqDto = new ImplementTwoDataRemovalExistsComReqDto();
        if (reqDto != null) {
            //simpleList-to-objLists
            for (String item : reqDto.getDeptList()) {
                DataSetsListOneDto oneItem = new DataSetsListOneDto();
                if (reqDto != null) {
                    oneItem.setCustomField(item);//SimpleFieldAssign//sourceId:190442_2_38572
                }

                implementTwoDataRemovalExistsComReqDto.getDataSetsListOne().add(oneItem);
            }//sourceId:874108_1_38572
//simpleList-to-objLists
            for (String item : reqDto.getSubordinateDeptList()) {
                DataSetsListTwoDto oneItem = new DataSetsListTwoDto();
                if (reqDto != null) {
                    oneItem.setCustomField(item);//SimpleFieldAssign//sourceId:190444_2_38572
                }

                implementTwoDataRemovalExistsComReqDto.getDataSetsListTwo().add(oneItem);
            }//sourceId:874109_1_38572
        }

        /*D2上级部门去除下级父级部门[5347]   */

        implementTwoDataRemovalExistsComRespDto = interfaceModeService.implementTwoDataRemovalExistsCom(implementTwoDataRemovalExistsComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        if ((implementTwoDataRemovalExistsComRespDto != null && implementTwoDataRemovalExistsComRespDto.getTwoDataRemovalExistsList() != null && implementTwoDataRemovalExistsComRespDto.getTwoDataRemovalExistsList().size() == 0 && reqDto != null && reqDto.getSubordinateDeptList() != null && reqDto.getSubordinateDeptList().size() > 0)) {
            //if((D2上级部门去除下级父级部门.两数据集去除已存在列表数据集条数 等于 0 and D1执行分析下属部门情况(公共).下级部门列表数据集条数 大于 0))  38573

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq.setSubordinateDivType("SUBORDINATE_ALL");

            /*M1约定为【下级全部有部门】[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq.getSubordinateDivType(), "D1执行分析下属部门情况(公共)-M1约定为【下级全部有部门】-下属部门情况 不能为空", false);
            receptionServiceRes = nbOrg.queryReceiveFieldDetail(receptionServiceReq);


//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_2 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_1 = new QueryReceiveFieldDetailReqDto();
            if (receptionServiceRes != null) {
                receptionServiceReq_1.setSubordinateDivType(receptionServiceRes.getSubordinateDivType());//SimpleFieldAssign//sourceId:874664_1_38576
            }

            /*M1-接收上文出参字段值[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_1.getSubordinateDivType(), "D1执行分析下属部门情况(公共)-M1-接收上文出参字段值-下属部门情况 不能为空", false);
            receptionServiceRes_2 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_1);


            receptionServiceRes_3 = receptionServiceRes_2;
        } else if ((implementTwoDataRemovalExistsComRespDto != null && implementTwoDataRemovalExistsComRespDto.getTwoDataRemovalExistsList() != null && implementTwoDataRemovalExistsComRespDto.getTwoDataRemovalExistsList().size() > 0 && reqDto != null && reqDto.getDeptList() != null && reqDto.getDeptList().size() > 0)) {
            //elseif((D2上级部门去除下级父级部门.两数据集去除已存在列表数据集条数 大于 0 and D1执行分析下属部门情况(公共).部门列表数据集条数 大于 0))  38574

            ImplementTwoDataRemovalExistsComRespDto implementTwoDataRemovalExistsComRespDto_2 = null;
            if (implementTwoDataRemovalExistsComRespDto != null) {
                ImplementTwoDataRemovalExistsComReqDto implementTwoDataRemovalExistsComReqDto_1 = new ImplementTwoDataRemovalExistsComReqDto();
                if (reqDto != null) {
                    //simpleList-to-objLists
                    for (String item : reqDto.getDeptList()) {
                        DataSetsListOneDto oneItem = new DataSetsListOneDto();
                        if (reqDto != null) {
                            oneItem.setCustomField(item);//SimpleFieldAssign//sourceId:190442_2_38577
                        }

                        implementTwoDataRemovalExistsComReqDto_1.getDataSetsListOne().add(oneItem);
                    }//sourceId:874108_1_38577
                }
                if (implementTwoDataRemovalExistsComRespDto != null && implementTwoDataRemovalExistsComRespDto.getTwoDataRemovalExistsList() != null && !CollectionUtil.isEmpty(implementTwoDataRemovalExistsComRespDto.getTwoDataRemovalExistsList())) {
                    implementTwoDataRemovalExistsComReqDto_1.setDataSetsListTwo(implementTwoDataRemovalExistsComRespDto.getTwoDataRemovalExistsList().stream().map(item -> BeanUtil.toBean(item, DataSetsListTwoDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:874109_1_38577
                }

                /*D2上级部门去除下级父级部门[5347]   */

                implementTwoDataRemovalExistsComRespDto_2 = interfaceModeService.implementTwoDataRemovalExistsCom(implementTwoDataRemovalExistsComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


            }
            if ((implementTwoDataRemovalExistsComRespDto_2 != null && implementTwoDataRemovalExistsComRespDto_2.getTwoDataRemovalExistsList() != null && implementTwoDataRemovalExistsComRespDto_2.getTwoDataRemovalExistsList().size() == 0)) {
                //if(D2上级部门去除过滤后的部门【用于分析下级部门是否部分有部门】.两数据集去除已存在列表数据集条数 等于 0)  38578

//ModelCode: receptionService
                QueryReceiveFieldDetailRespDto receptionServiceRes_4 = null;
                QueryReceiveFieldDetailReqDto receptionServiceReq_2 = new QueryReceiveFieldDetailReqDto();
                receptionServiceReq_2.setSubordinateDivType("SUBORDINATE_NO");//sourceId:874658_1_38579

                /*M1约定为【下级全部无部门】[3715]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_2.getSubordinateDivType(), "D1执行分析下属部门情况(公共)-M1约定为【下级全部无部门】-下属部门情况 不能为空", false);
                receptionServiceRes_4 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_2);


//ModelCode: receptionService
                QueryReceiveFieldDetailRespDto receptionServiceRes_6 = null;
                QueryReceiveFieldDetailReqDto receptionServiceReq_3 = new QueryReceiveFieldDetailReqDto();
                if (receptionServiceRes_4 != null) {
                    receptionServiceReq_3.setSubordinateDivType(receptionServiceRes_4.getSubordinateDivType());//SimpleFieldAssign//sourceId:874664_1_38580
                }

                /*M1-接收上文出参字段值[3715]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_3.getSubordinateDivType(), "D1执行分析下属部门情况(公共)-M1-接收上文出参字段值-下属部门情况 不能为空", false);
                receptionServiceRes_6 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_3);


                receptionServiceRes_3 = receptionServiceRes_6;
            } else if ((implementTwoDataRemovalExistsComRespDto_2 != null && implementTwoDataRemovalExistsComRespDto_2.getTwoDataRemovalExistsList() != null && implementTwoDataRemovalExistsComRespDto_2.getTwoDataRemovalExistsList().size() > 0)) {
                //elseif(D2上级部门去除过滤后的部门【用于分析下级部门是否部分有部门】.两数据集去除已存在列表数据集条数 大于 0)  38581

//ModelCode: receptionService
                QueryReceiveFieldDetailRespDto receptionServiceRes_7 = null;
                QueryReceiveFieldDetailReqDto receptionServiceReq_4 = new QueryReceiveFieldDetailReqDto();
                receptionServiceReq_4.setSubordinateDivType("SUBORDINATE_PART_DEPT");//sourceId:874663_1_38582

                /*M1约定为【下级部分有部门】[3715]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_4.getSubordinateDivType(), "D1执行分析下属部门情况(公共)-M1约定为【下级部分有部门】-下属部门情况 不能为空", false);
                receptionServiceRes_7 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_4);


//ModelCode: receptionService
                QueryReceiveFieldDetailRespDto receptionServiceRes_9 = null;
                QueryReceiveFieldDetailReqDto receptionServiceReq_5 = new QueryReceiveFieldDetailReqDto();
                if (receptionServiceRes_7 != null) {
                    receptionServiceReq_5.setSubordinateDivType(receptionServiceRes_7.getSubordinateDivType());//SimpleFieldAssign//sourceId:874664_1_38583
                }

                /*M1-接收上文出参字段值[3715]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_5.getSubordinateDivType(), "D1执行分析下属部门情况(公共)-M1-接收上文出参字段值-下属部门情况 不能为空", false);
                receptionServiceRes_9 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_5);


                receptionServiceRes_3 = receptionServiceRes_9;
            }
        }
        ImplementAnalyseSubordinateDeptSituationComRespDto retData = new ImplementAnalyseSubordinateDeptSituationComRespDto();
        if (receptionServiceRes_3 != null) {
            retData.setSubordinateDivType(receptionServiceRes_3.getSubordinateDivType());//SimpleFieldAssign//sourceId:874671_1
        }


        return retData;
    }

    /**
     * D1查询组织下部门列表(公共)[7229]
     * gen by moon at 3/31/2024, 1:37:00 AM
     */
    @Trace(operationName = "D1查询组织下部门列表(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryOrgBelowDeptListComRespDto queryOrgBelowDeptListCom(QueryOrgBelowDeptListComReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//步骤0: 1-3-09查询组织下部门列表 - queryOrgBelowDeptList
        List<Dept> listDept = new ArrayList<>();
        QueryOrgBelowDeptListReq queryOrgBelowDeptListReq = new QueryOrgBelowDeptListReq();
        if (reqDto != null) {
            queryOrgBelowDeptListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:1049635_1
            queryOrgBelowDeptListReq.setLevelNumber(reqDto.getLevelNumber());//SimpleFieldAssign//sourceId:1664185_1
            queryOrgBelowDeptListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1049636_1
            queryOrgBelowDeptListReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1501435_1
        }

        /*1-3-09查询组织下部门列表[7228]   */
        Assert.isNull(queryOrgBelowDeptListReq.getSpaceId(), "D1查询组织下部门列表(公共)-1-3-09查询组织下部门列表-创建于空间ID不能为空", false);
        listDept = mDeptService.queryOrgBelowDeptList(queryOrgBelowDeptListReq)/*vcase invoke 本地 method 方法调用;*/;


        listDept_1 = listDept;

        QueryOrgBelowDeptListComRespDto retData = new QueryOrgBelowDeptListComRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1049640_1


        return retData;
    }

    /**
     * D1-执行获取组织架构系统对接部门信息(公共)[7393]
     * gen by moon at 9/16/2023, 2:38:06 PM
     */
    @Trace(operationName = "D1-执行获取组织架构系统对接部门信息(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementObtainDockingDeptInfoComRespDto implementObtainDockingDeptInfoCom(ImplementObtainDockingDeptInfoComReqDto reqDto) {


        ImplementObtainDockingDeptInfoRespDto implementDockingDeptInfoRes_1 = null;
//步骤0: M1-执行获取组织架构系统对接部门信息（特殊方法） - implementObtainDockingDeptInfo
        //ModelCode: implementDockingDeptInfo
        ImplementObtainDockingDeptInfoRespDto implementDockingDeptInfoRes = null;
        ImplementObtainDockingDeptInfoReqDto implementDockingDeptInfoReq = new ImplementObtainDockingDeptInfoReqDto();
        if (reqDto != null) {
            implementDockingDeptInfoReq.setThirdServiceAddress(reqDto.getThirdServiceAddress());//SimpleFieldAssign//sourceId:1120917_1
            implementDockingDeptInfoReq.setOrgApiDockingKey(reqDto.getOrgApiDockingKey());//SimpleFieldAssign//sourceId:1123682_1
            implementDockingDeptInfoReq.setOrgApiDockingKeyFields(reqDto.getOrgApiDockingKeyFields());//SimpleFieldAssign//sourceId:1123681_1
            implementDockingDeptInfoReq.setInterfaceMethod(reqDto.getInterfaceMethod());//SimpleFieldAssign//sourceId:1123683_1
            implementDockingDeptInfoReq.setDeptCodeFields(reqDto.getDeptCodeFields());//SimpleFieldAssign//sourceId:1120762_1
            implementDockingDeptInfoReq.setDeptNameFields(reqDto.getDeptNameFields());//SimpleFieldAssign//sourceId:1120763_1
            implementDockingDeptInfoReq.setSuperiorsDeptCodeFields(reqDto.getSuperiorsDeptCodeFields());//SimpleFieldAssign//sourceId:1120764_1
            implementDockingDeptInfoReq.setSuperiorsDeptNameFields(reqDto.getSuperiorsDeptNameFields());//SimpleFieldAssign//sourceId:1120765_1
            implementDockingDeptInfoReq.setDeptEnNameFields(reqDto.getDeptEnNameFields());//SimpleFieldAssign//sourceId:1120766_1
            implementDockingDeptInfoReq.setDeptShortNameFields(reqDto.getDeptShortNameFields());//SimpleFieldAssign//sourceId:1120767_1
            implementDockingDeptInfoReq.setDeptLeaderRoleMemberCodeFields(reqDto.getDeptLeaderRoleMemberCodeFields());//SimpleFieldAssign//sourceId:1120770_1
            implementDockingDeptInfoReq.setDeptLeaderNameFields(reqDto.getDeptLeaderNameFields());//SimpleFieldAssign//sourceId:1120771_1
            implementDockingDeptInfoReq.setDirectorRoleMemberCodeFields(reqDto.getDirectorRoleMemberCodeFields());//SimpleFieldAssign//sourceId:1120768_1
            implementDockingDeptInfoReq.setDirectorNameFields(reqDto.getDirectorNameFields());//SimpleFieldAssign//sourceId:1120769_1
            implementDockingDeptInfoReq.setPartyAndYouthDirectorCodeFields(reqDto.getPartyAndYouthDirectorCodeFields());//SimpleFieldAssign//sourceId:1122278_1
            implementDockingDeptInfoReq.setPartyAndYouthDirectorNameFields(reqDto.getPartyAndYouthDirectorNameFields());//SimpleFieldAssign//sourceId:1122279_1
            implementDockingDeptInfoReq.setOrderNumberFields(reqDto.getOrderNumberFields());//SimpleFieldAssign//sourceId:1120772_1
            implementDockingDeptInfoReq.setTypeDictionaryFields(reqDto.getTypeDictionaryFields());//SimpleFieldAssign//sourceId:1120773_1
        }

        /*M1-执行获取组织架构系统对接部门信息（特殊方法）[7391]   */
        Assert.isNull(implementDockingDeptInfoReq.getThirdServiceAddress(), "D1-执行获取组织架构系统对接部门信息(公共)-M1-执行获取组织架构系统对接部门信息（特殊方法）-第三方服务接口地址不能为空", false);
        Assert.isNull(implementDockingDeptInfoReq.getDeptCodeFields(), "D1-执行获取组织架构系统对接部门信息(公共)-M1-执行获取组织架构系统对接部门信息（特殊方法）-部门编码字段名不能为空", false);
        Assert.isNull(implementDockingDeptInfoReq.getDeptNameFields(), "D1-执行获取组织架构系统对接部门信息(公共)-M1-执行获取组织架构系统对接部门信息（特殊方法）-部门中文名称字段名不能为空", false);
        implementDockingDeptInfoRes = nbOrg.implementObtainDockingDeptInfo(implementDockingDeptInfoReq);


        implementDockingDeptInfoRes_1 = implementDockingDeptInfoRes;

        ImplementObtainDockingDeptInfoComRespDto retData = new ImplementObtainDockingDeptInfoComRespDto();
        if (implementDockingDeptInfoRes_1 != null) {
            retData.setDockingDeptInfoList(implementDockingDeptInfoRes_1.getDockingDeptInfoList().stream().map(item -> BeanUtil.toBean(item, DockingDeptInfoDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1120927_1
        }


        return retData;
    }

    /**
     * D1-执行获取组织架构系统对接员工信息(公共)[7394]
     * gen by moon at 9/16/2023, 2:37:59 PM
     */
    @Trace(operationName = "D1-执行获取组织架构系统对接员工信息(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementObtainDockingPersonInfoComRespDto implementObtainDockingPersonInfoCom(ImplementObtainDockingPersonInfoComReqDto reqDto) {


        ImplementObtainDockingPersonInfoRespDto implementDockingPersonInfoRes_1 = null;
//步骤0: M1-执行获取组织架构系统对接员工信息（特殊方法） - implementObtainDockingPersonInfo
        //ModelCode: implementDockingPersonInfo
        ImplementObtainDockingPersonInfoRespDto implementDockingPersonInfoRes = null;
        ImplementObtainDockingPersonInfoReqDto implementDockingPersonInfoReq = new ImplementObtainDockingPersonInfoReqDto();
        if (reqDto != null) {
            implementDockingPersonInfoReq.setThirdServiceAddress(reqDto.getThirdServiceAddress());//SimpleFieldAssign//sourceId:1120920_1
            implementDockingPersonInfoReq.setInterfaceMethod(reqDto.getInterfaceMethod());//SimpleFieldAssign//sourceId:1123722_1
            implementDockingPersonInfoReq.setOrgApiDockingKey(reqDto.getOrgApiDockingKey());//SimpleFieldAssign//sourceId:1123723_1
            implementDockingPersonInfoReq.setOrgApiDockingKeyFields(reqDto.getOrgApiDockingKeyFields());//SimpleFieldAssign//sourceId:1123724_1
            implementDockingPersonInfoReq.setRoleMemberCodeFields(reqDto.getRoleMemberCodeFields());//SimpleFieldAssign//sourceId:1120839_1
            implementDockingPersonInfoReq.setNameFields(reqDto.getNameFields());//SimpleFieldAssign//sourceId:1120840_1
            implementDockingPersonInfoReq.setPositionIdNameFields(reqDto.getPositionIdNameFields());//SimpleFieldAssign//sourceId:1120841_1
            implementDockingPersonInfoReq.setSubordinateDeptFields(reqDto.getSubordinateDeptFields());//SimpleFieldAssign//sourceId:1120842_1
            implementDockingPersonInfoReq.setIdNumberFields(reqDto.getIdNumberFields());//SimpleFieldAssign//sourceId:1120843_1
            implementDockingPersonInfoReq.setPhoneFields(reqDto.getPhoneFields());//SimpleFieldAssign//sourceId:1120844_1
            implementDockingPersonInfoReq.setSexFields(reqDto.getSexFields());//SimpleFieldAssign//sourceId:1120845_1
            implementDockingPersonInfoReq.setPositionTypeFields(reqDto.getPositionTypeFields());//SimpleFieldAssign//sourceId:1120846_1
            implementDockingPersonInfoReq.setIsMainInductionFields(reqDto.getIsMainInductionFields());//SimpleFieldAssign//sourceId:1120847_1
            implementDockingPersonInfoReq.setIsDirectorFields(reqDto.getIsDirectorFields());//SimpleFieldAssign//sourceId:1120848_1
            implementDockingPersonInfoReq.setInductionStartTimeFields(reqDto.getInductionStartTimeFields());//SimpleFieldAssign//sourceId:1120849_1
            implementDockingPersonInfoReq.setOrderNumberFields(reqDto.getOrderNumberFields());//SimpleFieldAssign//sourceId:1120850_1
        }

        /*M1-执行获取组织架构系统对接员工信息（特殊方法）[7392]   */
        Assert.isNull(implementDockingPersonInfoReq.getThirdServiceAddress(), "D1-执行获取组织架构系统对接员工信息(公共)-M1-执行获取组织架构系统对接员工信息（特殊方法）-第三方服务接口地址不能为空", false);
        Assert.isNull(implementDockingPersonInfoReq.getRoleMemberCodeFields(), "D1-执行获取组织架构系统对接员工信息(公共)-M1-执行获取组织架构系统对接员工信息（特殊方法）-工号字段名不能为空", false);
        Assert.isNull(implementDockingPersonInfoReq.getNameFields(), "D1-执行获取组织架构系统对接员工信息(公共)-M1-执行获取组织架构系统对接员工信息（特殊方法）-姓名字段名不能为空", false);
        Assert.isNull(implementDockingPersonInfoReq.getPositionIdNameFields(), "D1-执行获取组织架构系统对接员工信息(公共)-M1-执行获取组织架构系统对接员工信息（特殊方法）-职务名称字段名不能为空", false);
        implementDockingPersonInfoRes = nbOrg.implementObtainDockingPersonInfo(implementDockingPersonInfoReq);


        implementDockingPersonInfoRes_1 = implementDockingPersonInfoRes;

        ImplementObtainDockingPersonInfoComRespDto retData = new ImplementObtainDockingPersonInfoComRespDto();
        if (implementDockingPersonInfoRes_1 != null) {
            retData.setDockingPersonInfoList(implementDockingPersonInfoRes_1.getDockingPersonInfoList().stream().map(item -> BeanUtil.toBean(item, DockingPersonInfoDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1120930_1
        }


        return retData;
    }

    /**
     * D1-循环处理部门源数据(公共)[7398]
     * gen by moon at 9/16/2023, 1:31:56 AM
     */
    @Trace(operationName = "D1-循环处理部门源数据(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementLoopHandleDeptSourceDataComRespDto implementLoopHandleDeptSourceDataCom(ImplementLoopHandleDeptSourceDataComReqDto reqDto) {


        //virtualUsage M1-执行部门源数据【循环开始】（特殊方法）  48512
        //ModelCode: circulationCollections
        for (DeptSourceDataDto circulationCollectionsRes : reqDto.getDeptSourceDataList()) {

//virtualUsage 1-3-17查询系统对接部门源数据详情  48513
            DepartSourceData departSourceData = null;
            QuerySystemDockingDeptSourceDataDetailReq querySystemDockingDeptSourceDataDetailReq = new QuerySystemDockingDeptSourceDataDetailReq();
            querySystemDockingDeptSourceDataDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1121221_1_48513
            if (reqDto != null) {
                querySystemDockingDeptSourceDataDetailReq.setDeptNumber(circulationCollectionsRes.getDeptNumber());//SimpleFieldAssign//sourceId:1121219_1_48513
                querySystemDockingDeptSourceDataDetailReq.setProjectId(reqDto.getProjectId());//SimpleFieldAssign//sourceId:1121220_1_48513
            }

            /*1-3-17查询系统对接部门源数据详情[7400]   */
            Assert.isNull(querySystemDockingDeptSourceDataDetailReq.getDeptNumber(), "D1-循环处理部门源数据(公共)-1-3-17查询系统对接部门源数据详情-部门编号不能为空", false);
            Assert.isNull(querySystemDockingDeptSourceDataDetailReq.getProjectId(), "D1-循环处理部门源数据(公共)-1-3-17查询系统对接部门源数据详情-关联项目ID不能为空", false);
            Assert.isNull(querySystemDockingDeptSourceDataDetailReq.getSpaceId(), "D1-循环处理部门源数据(公共)-1-3-17查询系统对接部门源数据详情-创建于空间ID不能为空", false);
            departSourceData = mDepartSourceDataService.querySystemDockingDeptSourceDataDetail(querySystemDockingDeptSourceDataDetailReq)/*vcase invoke 本地 method 方法调用;*/;


            if ((departSourceData == null)) {
                //if(1-3-17查询系统对接部门源数据详情.出参 值等于空 )  48514

                String string = null;
                DepartSourceData departSourceData_2 = new DepartSourceData();
                if (circulationCollectionsRes != null) {
                    departSourceData_2.setDeptNumber(circulationCollectionsRes.getDeptNumber());//SimpleFieldAssign//sourceId:1121250_1_48515
                    departSourceData_2.setDeptName(circulationCollectionsRes.getDeptName());//SimpleFieldAssign//sourceId:1121251_1_48515
                    departSourceData_2.setDeptEnName(circulationCollectionsRes.getDeptEnName());//SimpleFieldAssign//sourceId:1121252_1_48515
                    departSourceData_2.setDeptShortName(circulationCollectionsRes.getDeptShortName());//SimpleFieldAssign//sourceId:1121253_1_48515
                    departSourceData_2.setParentDeptNumber(circulationCollectionsRes.getParentDeptNumber());//SimpleFieldAssign//sourceId:1121254_1_48515
                    departSourceData_2.setParentDeptName(circulationCollectionsRes.getParentDeptName());//SimpleFieldAssign//sourceId:1121255_1_48515
                    departSourceData_2.setTypeDictionaryName(circulationCollectionsRes.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1121256_1_48515
                    departSourceData_2.setDirectorCode(circulationCollectionsRes.getDirectorCode());//SimpleFieldAssign//sourceId:1121260_1_48515
                    departSourceData_2.setPartyAndYouthDirectorCode(circulationCollectionsRes.getPartyAndYouthDirectorCode());//SimpleFieldAssign//sourceId:1121883_1_48515
                    departSourceData_2.setPartyAndYouthDirectorName(circulationCollectionsRes.getPartyAndYouthDirectorName());//SimpleFieldAssign//sourceId:1121885_1_48515
                    departSourceData_2.setDirectorName(circulationCollectionsRes.getDirectorName());//SimpleFieldAssign//sourceId:1121257_1_48515
                    departSourceData_2.setDeptLeaderCode(circulationCollectionsRes.getDeptLeaderCode());//SimpleFieldAssign//sourceId:1121258_1_48515
                    departSourceData_2.setDeptLeaderName(circulationCollectionsRes.getDeptLeaderName());//SimpleFieldAssign//sourceId:1121259_1_48515
                    departSourceData_2.setOrderNumber(circulationCollectionsRes.getOrderNumber());//SimpleFieldAssign//sourceId:1121261_1_48515
                    departSourceData_2.setDataIsComplete(circulationCollectionsRes.getDataIsComplete());//SimpleFieldAssign//sourceId:1121262_1_48515
                }
                if (reqDto != null) {
                    departSourceData_2.setProjectId(reqDto.getProjectId());//SimpleFieldAssign//sourceId:1121263_1_48515
                }

                /*1-3-17新增系统对接部门源数据[7399]   */
                Assert.isNull(departSourceData_2.getDeptNumber(), "D1-循环处理部门源数据(公共)-1-3-17新增系统对接部门源数据-部门编号不能为空", false);
                Assert.isNull(departSourceData_2.getDeptName(), "D1-循环处理部门源数据(公共)-1-3-17新增系统对接部门源数据-部门名称（中文）不能为空", false);
                Assert.isNull(departSourceData_2.getDataIsComplete(), "D1-循环处理部门源数据(公共)-1-3-17新增系统对接部门源数据-数据是否完整不能为空", false);
                Assert.isNull(departSourceData_2.getProjectId(), "D1-循环处理部门源数据(公共)-1-3-17新增系统对接部门源数据-关联项目ID不能为空", false);
                string = mDepartSourceDataService.addSystemDockingDeptSourceData(departSourceData_2)/*vcase invoke 本地 method 方法调用;*/;


            } else {
                //else  48516

                boolean bOOLEAN;
                if (departSourceData != null) {
                    DepartSourceData departSourceData_3 = new DepartSourceData();
                    if (departSourceData != null) {
                        departSourceData_3.setDeptSourceDataId(departSourceData.getDeptSourceDataId());//SimpleFieldAssign//sourceId:1121283_1_48517
                    }
                    if (circulationCollectionsRes != null) {
                        departSourceData_3.setDeptNumber(circulationCollectionsRes.getDeptNumber());//SimpleFieldAssign//sourceId:1121284_1_48517
                        departSourceData_3.setDeptName(circulationCollectionsRes.getDeptName());//SimpleFieldAssign//sourceId:1121285_1_48517
                        departSourceData_3.setDeptEnName(circulationCollectionsRes.getDeptEnName());//SimpleFieldAssign//sourceId:1121286_1_48517
                        departSourceData_3.setDeptShortName(circulationCollectionsRes.getDeptShortName());//SimpleFieldAssign//sourceId:1121287_1_48517
                        departSourceData_3.setParentDeptNumber(circulationCollectionsRes.getParentDeptNumber());//SimpleFieldAssign//sourceId:1121288_1_48517
                        departSourceData_3.setParentDeptName(circulationCollectionsRes.getParentDeptName());//SimpleFieldAssign//sourceId:1121289_1_48517
                        departSourceData_3.setTypeDictionaryName(circulationCollectionsRes.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1121290_1_48517
                        departSourceData_3.setDeptLeaderCode(circulationCollectionsRes.getDeptLeaderCode());//SimpleFieldAssign//sourceId:1121292_1_48517
                        departSourceData_3.setDeptLeaderName(circulationCollectionsRes.getDeptLeaderName());//SimpleFieldAssign//sourceId:1121293_1_48517
                        departSourceData_3.setDirectorCode(circulationCollectionsRes.getDirectorCode());//SimpleFieldAssign//sourceId:1121294_1_48517
                        departSourceData_3.setDirectorName(circulationCollectionsRes.getDirectorName());//SimpleFieldAssign//sourceId:1121291_1_48517
                        departSourceData_3.setPartyAndYouthDirectorCode(circulationCollectionsRes.getPartyAndYouthDirectorCode());//SimpleFieldAssign//sourceId:1121892_1_48517
                        departSourceData_3.setPartyAndYouthDirectorName(circulationCollectionsRes.getPartyAndYouthDirectorName());//SimpleFieldAssign//sourceId:1121893_1_48517
                        departSourceData_3.setOrderNumber(circulationCollectionsRes.getOrderNumber());//SimpleFieldAssign//sourceId:1121295_1_48517
                    }

                    /*1-3-17修改系统对接部门源数据[7403]   */
                    Assert.isNull(departSourceData_3.getDeptSourceDataId(), "D1-循环处理部门源数据(公共)-1-3-17修改系统对接部门源数据-对接部门源数据ID不能为空", false);
                    bOOLEAN = mDepartSourceDataService.updateSystemDockingDeptSourceData(departSourceData_3)/*vcase invoke 本地 method 方法调用;*/;


                }
            }
//virtualUsage M-循环结束（特殊方法）  48518
            //ModelCode: circulationEnd
        }

        ImplementLoopHandleDeptSourceDataComRespDto retData = new ImplementLoopHandleDeptSourceDataComRespDto();


        return retData;
    }

    /**
     * D1-执行组织架构API对接部门信息(公共)[7412]
     * gen by moon at 9/16/2023, 1:31:59 AM
     */
    @Trace(operationName = "D1-执行组织架构API对接部门信息(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementOrgImportDeptDataByApiComRespDto implementOrgImportDeptDataByApiCom(ImplementOrgImportDeptDataByApiComReqDto reqDto) {


        //virtualUsage D2-3查空间是否启用API对接  48534
        QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto = null;
        QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto = new QueryConfItemMatchAnswerDetailComReqDto();
        queryConfItemMatchAnswerDetailComReqDto.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122307_1_48534
        queryConfItemMatchAnswerDetailComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:1122306_1_48534
        queryConfItemMatchAnswerDetailComReqDto.setConfItemCode("ORG_DOCKING");//CUSTOM_CONVENTION//sourceId:1122305_1_48534
        queryConfItemMatchAnswerDetailComReqDto.setIsPlatData("FALSE");//sourceId:1122314_1_48534

        /*D2-3查空间是否启用API对接[2486]   */
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getResultAspObjId(), "D1-执行组织架构API对接部门信息(公共)-D2-3查空间是否启用API对接-开通对象ID不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getResultAspObjType(), "D1-执行组织架构API对接部门信息(公共)-D2-3查空间是否启用API对接-开通对象类型编码不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getConfItemCode(), "D1-执行组织架构API对接部门信息(公共)-D2-3查空间是否启用API对接-配置项标识不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getIsPlatData(), "D1-执行组织架构API对接部门信息(公共)-D2-3查空间是否启用API对接-是否标准答案不能为空", false);
        queryConfItemMatchAnswerDetailComRespDto = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        if ((queryConfItemMatchAnswerDetailComRespDto != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue() != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue().equals("ORG_API_DOCKING") || queryConfItemMatchAnswerDetailComRespDto != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue() != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue().equals("ORG_API_EXCEL_DOCKING"))) {
            //if((D2-3查空间是否启用API对接.答案值 等于 API对接 or D2-3查空间是否启用API对接.答案值 等于 API与Excel混合))  48535

            List<DepartSourceData> listDepartSourceData = new ArrayList<>();
            QuerySystemDockingDeptSourceDataListReq querySystemDockingDeptSourceDataListReq = new QuerySystemDockingDeptSourceDataListReq();
            querySystemDockingDeptSourceDataListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122691_1_48554
            if (reqDto != null) {
                querySystemDockingDeptSourceDataListReq.setProjectId(reqDto.getProjectId());//SimpleFieldAssign//sourceId:1122689_1_48554
            }

            /*1-3-17查询系统对接部门源数据列表[7413]   */
            Assert.isNull(querySystemDockingDeptSourceDataListReq.getProjectId(), "D1-执行组织架构API对接部门信息(公共)-1-3-17查询系统对接部门源数据列表-关联项目ID不能为空", false);
            Assert.isNull(querySystemDockingDeptSourceDataListReq.getSpaceId(), "D1-执行组织架构API对接部门信息(公共)-1-3-17查询系统对接部门源数据列表-创建于空间ID不能为空", false);
            listDepartSourceData = mDepartSourceDataService.querySystemDockingDeptSourceDataList(querySystemDockingDeptSourceDataListReq)/*vcase invoke 本地 method 方法调用;*/;


            if ((listDepartSourceData != null && listDepartSourceData != null && listDepartSourceData.size() == 0)) {
                //if(1-3-17查询该项目是否已存在系统对接部门源数据.部门源数据列表数据集条数 等于 0)  48555

                QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_2 = null;
                QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto_1 = new QueryConfItemMatchAnswerDetailComReqDto();
                queryConfItemMatchAnswerDetailComReqDto_1.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122694_1_48557
                queryConfItemMatchAnswerDetailComReqDto_1.setResultAspObjType("TENANT_SPACE");//sourceId:1122693_1_48557
                queryConfItemMatchAnswerDetailComReqDto_1.setConfItemCode("ORG_API_URL");//CUSTOM_CONVENTION//sourceId:1122692_1_48557
                queryConfItemMatchAnswerDetailComReqDto_1.setConfOptionCode("DEPT_API_URL");//CUSTOM_CONVENTION//sourceId:1122706_1_48557
                queryConfItemMatchAnswerDetailComReqDto_1.setIsPlatData("FALSE");//sourceId:1122701_1_48557

                /*D2-3查组织架构对接部门API地址[2486]   */
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getResultAspObjId(), "D1-执行组织架构API对接部门信息(公共)-D2-3查组织架构对接部门API地址-开通对象ID不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getResultAspObjType(), "D1-执行组织架构API对接部门信息(公共)-D2-3查组织架构对接部门API地址-开通对象类型编码不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getConfItemCode(), "D1-执行组织架构API对接部门信息(公共)-D2-3查组织架构对接部门API地址-配置项标识不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getConfOptionCode(), "D1-执行组织架构API对接部门信息(公共)-D2-3查组织架构对接部门API地址-选项标识不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getIsPlatData(), "D1-执行组织架构API对接部门信息(公共)-D2-3查组织架构对接部门API地址-是否标准答案不能为空", false);
                queryConfItemMatchAnswerDetailComRespDto_2 = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


                QueryItemMatchResultOptionToAnswerDetailComRespDto queryItemMatchResultOptionToAnswerDetailComRespDto = null;
                QueryItemMatchResultOptionToAnswerDetailComReqDto queryItemMatchResultOptionToAnswerDetailComReqDto = new QueryItemMatchResultOptionToAnswerDetailComReqDto();
                queryItemMatchResultOptionToAnswerDetailComReqDto.setConfItemCode("DEPT_FIELDS_SHIFT");//CUSTOM_CONVENTION//sourceId:1122519_1_48556
                queryItemMatchResultOptionToAnswerDetailComReqDto.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122520_1_48556
                queryItemMatchResultOptionToAnswerDetailComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:1122521_1_48556
                queryItemMatchResultOptionToAnswerDetailComReqDto.setIsPlatData("FALSE");//sourceId:1122522_1_48556
                queryItemMatchResultOptionToAnswerDetailComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1122537_1_48556

                /*D2-3查部门对接转化字段配置[5991]   */
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getConfItemCode(), "D1-执行组织架构API对接部门信息(公共)-D2-3查部门对接转化字段配置-配置项标识不能为空", false);
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getResultAspObjId(), "D1-执行组织架构API对接部门信息(公共)-D2-3查部门对接转化字段配置-开通对象ID不能为空", false);
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getResultAspObjType(), "D1-执行组织架构API对接部门信息(公共)-D2-3查部门对接转化字段配置-开通对象类型编码不能为空", false);
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getIsPlatData(), "D1-执行组织架构API对接部门信息(公共)-D2-3查部门对接转化字段配置-是否标准答案不能为空", false);
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getSubjectLifeCycle(), "D1-执行组织架构API对接部门信息(公共)-D2-3查部门对接转化字段配置-主体生命周期不能为空", false);
                queryItemMatchResultOptionToAnswerDetailComRespDto = confSchemeService.queryItemMatchResultOptionToAnswerDetailCom(queryItemMatchResultOptionToAnswerDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                ImplementObtainDockingDeptInfoComRespDto implementObtainDockingDeptInfoComRespDto = null;
                if (queryConfItemMatchAnswerDetailComRespDto_2 != null && queryItemMatchResultOptionToAnswerDetailComRespDto != null) {
                    ImplementObtainDockingDeptInfoComReqDto implementObtainDockingDeptInfoComReqDto = new ImplementObtainDockingDeptInfoComReqDto();
                    if (queryConfItemMatchAnswerDetailComRespDto_2 != null) {
                        implementObtainDockingDeptInfoComReqDto.setThirdServiceAddress(queryConfItemMatchAnswerDetailComRespDto_2.getEndValue());//SimpleFieldAssign//sourceId:1121917_1_48558
                    }
                    if (queryItemMatchResultOptionToAnswerDetailComRespDto != null) {
                        implementObtainDockingDeptInfoComReqDto.setDeptCodeFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDeptCodeFields());//SimpleFieldAssign//sourceId:1121905_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDeptNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDeptNameFields());//SimpleFieldAssign//sourceId:1121906_1_48558
                        implementObtainDockingDeptInfoComReqDto.setSuperiorsDeptCodeFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getSuperiorsDeptCodeFields());//SimpleFieldAssign//sourceId:1121907_1_48558
                        implementObtainDockingDeptInfoComReqDto.setSuperiorsDeptNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getSuperiorsDeptNameFields());//SimpleFieldAssign//sourceId:1121908_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDeptEnNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDeptEnNameFields());//SimpleFieldAssign//sourceId:1121909_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDeptShortNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDeptShortNameFields());//SimpleFieldAssign//sourceId:1121910_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDeptLeaderRoleMemberCodeFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDeptLeaderRoleMemberCodeFields());//SimpleFieldAssign//sourceId:1121913_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDeptLeaderNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDeptLeaderNameFields());//SimpleFieldAssign//sourceId:1121914_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDirectorRoleMemberCodeFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDirectorRoleMemberCodeFields());//SimpleFieldAssign//sourceId:1121911_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDirectorNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDirectorNameFields());//SimpleFieldAssign//sourceId:1121912_1_48558
                        implementObtainDockingDeptInfoComReqDto.setPartyAndYouthDirectorCodeFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getPartyAndYouthDirectorCodeFields());//SimpleFieldAssign//sourceId:1122283_1_48558
                        implementObtainDockingDeptInfoComReqDto.setPartyAndYouthDirectorNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getPartyAndYouthDirectorNameFields());//SimpleFieldAssign//sourceId:1122284_1_48558
                        implementObtainDockingDeptInfoComReqDto.setOrderNumberFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getOrderNumberFields());//SimpleFieldAssign//sourceId:1121915_1_48558
                        implementObtainDockingDeptInfoComReqDto.setTypeDictionaryFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getTypeDictionaryFields());//SimpleFieldAssign//sourceId:1121916_1_48558
                    }

                    /*D1-执行获取组织架构系统对接部门信息(公共)[7393]   */
                    Assert.isNull(implementObtainDockingDeptInfoComReqDto.getThirdServiceAddress(), "D1-执行组织架构API对接部门信息(公共)-D1-执行获取组织架构系统对接部门信息(公共)-第三方服务接口地址不能为空", false);
                    Assert.isNull(implementObtainDockingDeptInfoComReqDto.getDeptCodeFields(), "D1-执行组织架构API对接部门信息(公共)-D1-执行获取组织架构系统对接部门信息(公共)-部门编码字段名不能为空", false);
                    Assert.isNull(implementObtainDockingDeptInfoComReqDto.getDeptNameFields(), "D1-执行组织架构API对接部门信息(公共)-D1-执行获取组织架构系统对接部门信息(公共)-部门中文名称字段名不能为空", false);
                    implementObtainDockingDeptInfoComRespDto = implementObtainDockingDeptInfoCom(implementObtainDockingDeptInfoComReqDto)/*vcase invoke 同服务,同domain*/;


                }
                if ((implementObtainDockingDeptInfoComRespDto != null && implementObtainDockingDeptInfoComRespDto.getDockingDeptInfoList() != null && implementObtainDockingDeptInfoComRespDto.getDockingDeptInfoList().size() > 0)) {
                    //if(D1-执行获取组织架构系统对接部门信息(公共).组织架构系统对接部门信息列表数据集条数 大于 0)  48559

                    QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_4 = null;
                    QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto_2 = new QueryConfItemMatchAnswerDetailComReqDto();
                    queryConfItemMatchAnswerDetailComReqDto_2.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122654_1_48560
                    queryConfItemMatchAnswerDetailComReqDto_2.setResultAspObjType("TENANT_SPACE");//sourceId:1122653_1_48560
                    queryConfItemMatchAnswerDetailComReqDto_2.setConfItemCode("DEPT_DATA_IS_INTACT");//CUSTOM_CONVENTION//sourceId:1122652_1_48560
                    queryConfItemMatchAnswerDetailComReqDto_2.setIsPlatData("FALSE");//sourceId:1122661_1_48560

                    /*D2-3查数据对接部门数据是否完整[2486]   */
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_2.getResultAspObjId(), "D1-执行组织架构API对接部门信息(公共)-D2-3查数据对接部门数据是否完整-开通对象ID不能为空", false);
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_2.getResultAspObjType(), "D1-执行组织架构API对接部门信息(公共)-D2-3查数据对接部门数据是否完整-开通对象类型编码不能为空", false);
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_2.getConfItemCode(), "D1-执行组织架构API对接部门信息(公共)-D2-3查数据对接部门数据是否完整-配置项标识不能为空", false);
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_2.getIsPlatData(), "D1-执行组织架构API对接部门信息(公共)-D2-3查数据对接部门数据是否完整-是否标准答案不能为空", false);
                    queryConfItemMatchAnswerDetailComRespDto_4 = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto_2).getData()/*vcase invoke 跨dubbo调用;*/;


                    boolean bOOLEAN;
                    if (implementObtainDockingDeptInfoComRespDto != null && queryConfItemMatchAnswerDetailComRespDto_4 != null) {
                        List<DepartSourceData> listDepartSourceData_2 = new ArrayList<>();
                        if (implementObtainDockingDeptInfoComRespDto != null && implementObtainDockingDeptInfoComRespDto.getDockingDeptInfoList() != null && !CollectionUtil.isEmpty(implementObtainDockingDeptInfoComRespDto.getDockingDeptInfoList())) {
                            QueryConfItemMatchAnswerDetailComRespDto finalQueryConfItemMatchAnswerDetailComRespDto_ = queryConfItemMatchAnswerDetailComRespDto_4;
                            listDepartSourceData_2 = //objList-to-objLists
                                    implementObtainDockingDeptInfoComRespDto.getDockingDeptInfoList().stream().map(item -> {
                                        DepartSourceData elm = new DepartSourceData();
                                        if (item != null) {
                                            elm.setDeptNumber(item.getDeptNumber());//SimpleFieldAssign//sourceId:234151_2_48561
                                            elm.setDeptName(item.getDeptName());//SimpleFieldAssign//sourceId:234152_2_48561
                                            elm.setDeptEnName(item.getDeptEnName());//SimpleFieldAssign//sourceId:234153_2_48561
                                            elm.setDeptShortName(item.getDeptShortName());//SimpleFieldAssign//sourceId:234154_2_48561
                                            elm.setParentDeptNumber(item.getParentDeptNumber());//SimpleFieldAssign//sourceId:234155_2_48561
                                            elm.setParentDeptName(item.getParentDeptName());//SimpleFieldAssign//sourceId:234156_2_48561
                                            elm.setTypeDictionaryName(item.getTypeDictionaryName());//SimpleFieldAssign//sourceId:234157_2_48561
                                            elm.setDeptLeaderCode(item.getDeptLeaderCode());//SimpleFieldAssign//sourceId:234160_2_48561
                                            elm.setDeptLeaderName(item.getDeptLeaderName());//SimpleFieldAssign//sourceId:234161_2_48561
                                            elm.setDirectorCode(item.getDirectorCode());//SimpleFieldAssign//sourceId:234163_2_48561
                                            elm.setDirectorName(item.getDirectorName());//SimpleFieldAssign//sourceId:234159_2_48561
                                            elm.setPartyAndYouthDirectorCode(item.getPartyAndYouthDirectorCode());//SimpleFieldAssign//sourceId:234162_2_48561
                                            elm.setPartyAndYouthDirectorName(item.getPartyAndYouthDirectorName());//SimpleFieldAssign//sourceId:234158_2_48561
                                            elm.setOrderNumber(item.getOrderNumber());//SimpleFieldAssign//sourceId:234164_2_48561
                                        }
                                        if (finalQueryConfItemMatchAnswerDetailComRespDto_ != null) {
                                            elm.setDataIsComplete(finalQueryConfItemMatchAnswerDetailComRespDto_.getEndValue());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:234165_2_48561
                                        }
                                        if (reqDto != null) {
                                            elm.setProjectId(reqDto.getProjectId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:234166_2_48561
                                        }
                                        return elm;
                                    }).collect(Collectors.toList());//objList-to-objLists//sourceId:1122094_1_48561
                        }

                        /*1-3-17批量增系统对接部门源数据[7401]   */

                        bOOLEAN = mDepartSourceDataService.batchAddSystemDockingDeptSourceData(listDepartSourceData_2)/*vcase invoke 本地 method 方法调用;*/;


                    }
                }
            }
        } else {
            //else  48529

//processBranchName:正常结束 ,processBranchId:48530

        }
        ImplementOrgImportDeptDataByApiComRespDto retData = new ImplementOrgImportDeptDataByApiComRespDto();


        return retData;
    }

    /**
     * D1-执行组织架构API对接部门信息[7412]
     * gen by moon at 9/16/2023, 3:04:27 PM
     */
    @Trace(operationName = "D1-执行组织架构API对接部门信息")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementOrgImportDeptDataByApiRespDto implementOrgImportDeptDataByApi(ImplementOrgImportDeptDataByApiReqDto reqDto) {


        //virtualUsage D2-3查空间是否启用API对接  48534
        QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto = null;
        QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto = new QueryConfItemMatchAnswerDetailComReqDto();
        queryConfItemMatchAnswerDetailComReqDto.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122307_1_48534
        queryConfItemMatchAnswerDetailComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:1122306_1_48534
        queryConfItemMatchAnswerDetailComReqDto.setConfItemCode("ORG_DOCKING");//CUSTOM_CONVENTION//sourceId:1122305_1_48534
        queryConfItemMatchAnswerDetailComReqDto.setIsPlatData("FALSE");//sourceId:1122314_1_48534

        /*D2-3查空间是否启用API对接[2486]   */
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getResultAspObjId(), "D1-执行组织架构API对接部门信息-D2-3查空间是否启用API对接-开通对象ID不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getResultAspObjType(), "D1-执行组织架构API对接部门信息-D2-3查空间是否启用API对接-开通对象类型编码不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getConfItemCode(), "D1-执行组织架构API对接部门信息-D2-3查空间是否启用API对接-配置项标识不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getIsPlatData(), "D1-执行组织架构API对接部门信息-D2-3查空间是否启用API对接-是否标准答案不能为空", false);
        queryConfItemMatchAnswerDetailComRespDto = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        if ((queryConfItemMatchAnswerDetailComRespDto != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue() != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue().equals("ORG_API_DOCKING") || queryConfItemMatchAnswerDetailComRespDto != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue() != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue().equals("ORG_API_EXCEL_DOCKING"))) {
            //if((D2-3查空间是否启用API对接.答案值 等于 API对接 or D2-3查空间是否启用API对接.答案值 等于 API与Excel混合))  48535

            List<DepartSourceData> listDepartSourceData = new ArrayList<>();
            QuerySystemDockingDeptSourceDataListReq querySystemDockingDeptSourceDataListReq = new QuerySystemDockingDeptSourceDataListReq();
            querySystemDockingDeptSourceDataListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122691_1_48554
            if (reqDto != null) {
                querySystemDockingDeptSourceDataListReq.setProjectId(reqDto.getProjectId());//SimpleFieldAssign//sourceId:1122689_1_48554
            }

            /*1-3-17查询系统对接部门源数据列表[7413]   */
            Assert.isNull(querySystemDockingDeptSourceDataListReq.getProjectId(), "D1-执行组织架构API对接部门信息-1-3-17查询系统对接部门源数据列表-关联项目ID不能为空", false);
            Assert.isNull(querySystemDockingDeptSourceDataListReq.getSpaceId(), "D1-执行组织架构API对接部门信息-1-3-17查询系统对接部门源数据列表-创建于空间ID不能为空", false);
            listDepartSourceData = mDepartSourceDataService.querySystemDockingDeptSourceDataList(querySystemDockingDeptSourceDataListReq)/*vcase invoke 本地 method 方法调用;*/;


            if ((listDepartSourceData != null && listDepartSourceData != null && listDepartSourceData.size() == 0)) {
                //if(1-3-17查询该项目是否已存在系统对接部门源数据.部门源数据列表数据集条数 等于 0)  48555

                QueryItemMatchMultiSelectResultToAnswerListComRespDto queryItemMatchMultiSelectResultToAnswerListComRespDto = null;
                QueryItemMatchMultiSelectResultToAnswerListComReqDto queryItemMatchMultiSelectResultToAnswerListComReqDto = new QueryItemMatchMultiSelectResultToAnswerListComReqDto();
                queryItemMatchMultiSelectResultToAnswerListComReqDto.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1123647_1_48577
                queryItemMatchMultiSelectResultToAnswerListComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:1123648_1_48577
                queryItemMatchMultiSelectResultToAnswerListComReqDto.setConfItemCode("ORG_API_URL");//CUSTOM_CONVENTION//sourceId:1123649_1_48577
                queryItemMatchMultiSelectResultToAnswerListComReqDto.setIsPlatData("FALSE");//sourceId:1123650_1_48577

                /*D2-3查组织架构对接API地址&接口请求类型[5196]   */
                Assert.isNull(queryItemMatchMultiSelectResultToAnswerListComReqDto.getResultAspObjId(), "D1-执行组织架构API对接部门信息-D2-3查组织架构对接API地址&接口请求类型-开通对象ID不能为空", false);
                Assert.isNull(queryItemMatchMultiSelectResultToAnswerListComReqDto.getResultAspObjType(), "D1-执行组织架构API对接部门信息-D2-3查组织架构对接API地址&接口请求类型-开通对象类型编码不能为空", false);
                Assert.isNull(queryItemMatchMultiSelectResultToAnswerListComReqDto.getConfItemCode(), "D1-执行组织架构API对接部门信息-D2-3查组织架构对接API地址&接口请求类型-配置项标识不能为空", false);
                Assert.isNull(queryItemMatchMultiSelectResultToAnswerListComReqDto.getIsPlatData(), "D1-执行组织架构API对接部门信息-D2-3查组织架构对接API地址&接口请求类型-是否标准答案不能为空", false);
                queryItemMatchMultiSelectResultToAnswerListComRespDto = confSchemeService.queryItemMatchMultiSelectResultToAnswerListCom(queryItemMatchMultiSelectResultToAnswerListComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_2 = null;
                QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto_1 = new QueryConfItemMatchAnswerDetailComReqDto();
                queryConfItemMatchAnswerDetailComReqDto_1.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122694_1_48557
                queryConfItemMatchAnswerDetailComReqDto_1.setResultAspObjType("TENANT_SPACE");//sourceId:1122693_1_48557
                queryConfItemMatchAnswerDetailComReqDto_1.setConfItemCode("ORG_API_DOCKING_KEY");//CUSTOM_CONVENTION//sourceId:1122692_1_48557
                queryConfItemMatchAnswerDetailComReqDto_1.setIsPlatData("FALSE");//sourceId:1122701_1_48557

                /*D2-3查组织架构对接API对接KEY[2486]   */
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getResultAspObjId(), "D1-执行组织架构API对接部门信息-D2-3查组织架构对接API对接KEY-开通对象ID不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getResultAspObjType(), "D1-执行组织架构API对接部门信息-D2-3查组织架构对接API对接KEY-开通对象类型编码不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getConfItemCode(), "D1-执行组织架构API对接部门信息-D2-3查组织架构对接API对接KEY-配置项标识不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getIsPlatData(), "D1-执行组织架构API对接部门信息-D2-3查组织架构对接API对接KEY-是否标准答案不能为空", false);
                queryConfItemMatchAnswerDetailComRespDto_2 = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


                QueryItemMatchResultOptionToAnswerDetailComRespDto queryItemMatchResultOptionToAnswerDetailComRespDto = null;
                QueryItemMatchResultOptionToAnswerDetailComReqDto queryItemMatchResultOptionToAnswerDetailComReqDto = new QueryItemMatchResultOptionToAnswerDetailComReqDto();
                queryItemMatchResultOptionToAnswerDetailComReqDto.setConfItemCode("DEPT_FIELDS_SHIFT");//CUSTOM_CONVENTION//sourceId:1122519_1_48556
                queryItemMatchResultOptionToAnswerDetailComReqDto.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122520_1_48556
                queryItemMatchResultOptionToAnswerDetailComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:1122521_1_48556
                queryItemMatchResultOptionToAnswerDetailComReqDto.setIsPlatData("FALSE");//sourceId:1122522_1_48556
                queryItemMatchResultOptionToAnswerDetailComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1122537_1_48556

                /*D2-3查部门对接转化字段配置[5991]   */
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getConfItemCode(), "D1-执行组织架构API对接部门信息-D2-3查部门对接转化字段配置-配置项标识不能为空", false);
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getResultAspObjId(), "D1-执行组织架构API对接部门信息-D2-3查部门对接转化字段配置-开通对象ID不能为空", false);
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getResultAspObjType(), "D1-执行组织架构API对接部门信息-D2-3查部门对接转化字段配置-开通对象类型编码不能为空", false);
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getIsPlatData(), "D1-执行组织架构API对接部门信息-D2-3查部门对接转化字段配置-是否标准答案不能为空", false);
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getSubjectLifeCycle(), "D1-执行组织架构API对接部门信息-D2-3查部门对接转化字段配置-主体生命周期不能为空", false);
                queryItemMatchResultOptionToAnswerDetailComRespDto = confSchemeService.queryItemMatchResultOptionToAnswerDetailCom(queryItemMatchResultOptionToAnswerDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                ImplementObtainDockingDeptInfoComRespDto implementObtainDockingDeptInfoComRespDto = null;
                if (queryItemMatchMultiSelectResultToAnswerListComRespDto != null && queryConfItemMatchAnswerDetailComRespDto_2 != null && queryItemMatchResultOptionToAnswerDetailComRespDto != null) {
                    ImplementObtainDockingDeptInfoComReqDto implementObtainDockingDeptInfoComReqDto = new ImplementObtainDockingDeptInfoComReqDto();
                    if (queryItemMatchMultiSelectResultToAnswerListComRespDto != null) {
                        implementObtainDockingDeptInfoComReqDto.setThirdServiceAddress(queryItemMatchMultiSelectResultToAnswerListComRespDto.getDeptApiUrl());//SimpleFieldAssign//sourceId:1121917_1_48558
                        implementObtainDockingDeptInfoComReqDto.setInterfaceMethod(queryItemMatchMultiSelectResultToAnswerListComRespDto.getInterfaceMethod());//SimpleFieldAssign//sourceId:1123689_1_48558
                    }
                    if (queryConfItemMatchAnswerDetailComRespDto_2 != null) {
                        implementObtainDockingDeptInfoComReqDto.setOrgApiDockingKey(queryConfItemMatchAnswerDetailComRespDto_2.getEndValue());//SimpleFieldAssign//sourceId:1123687_1_48558
                    }
                    if (queryItemMatchResultOptionToAnswerDetailComRespDto != null) {
                        implementObtainDockingDeptInfoComReqDto.setOrgApiDockingKeyFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getOrgApiDockingKeyFields());//SimpleFieldAssign//sourceId:1123688_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDeptCodeFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDeptCodeFields());//SimpleFieldAssign//sourceId:1121905_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDeptNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDeptNameFields());//SimpleFieldAssign//sourceId:1121906_1_48558
                        implementObtainDockingDeptInfoComReqDto.setSuperiorsDeptCodeFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getSuperiorsDeptCodeFields());//SimpleFieldAssign//sourceId:1121907_1_48558
                        implementObtainDockingDeptInfoComReqDto.setSuperiorsDeptNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getSuperiorsDeptNameFields());//SimpleFieldAssign//sourceId:1121908_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDeptEnNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDeptEnNameFields());//SimpleFieldAssign//sourceId:1121909_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDeptShortNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDeptShortNameFields());//SimpleFieldAssign//sourceId:1121910_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDeptLeaderRoleMemberCodeFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDeptLeaderRoleMemberCodeFields());//SimpleFieldAssign//sourceId:1121913_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDeptLeaderNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDeptLeaderNameFields());//SimpleFieldAssign//sourceId:1121914_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDirectorRoleMemberCodeFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDirectorRoleMemberCodeFields());//SimpleFieldAssign//sourceId:1121911_1_48558
                        implementObtainDockingDeptInfoComReqDto.setDirectorNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getDirectorNameFields());//SimpleFieldAssign//sourceId:1121912_1_48558
                        implementObtainDockingDeptInfoComReqDto.setPartyAndYouthDirectorCodeFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getPartyAndYouthDirectorCodeFields());//SimpleFieldAssign//sourceId:1122283_1_48558
                        implementObtainDockingDeptInfoComReqDto.setPartyAndYouthDirectorNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getPartyAndYouthDirectorNameFields());//SimpleFieldAssign//sourceId:1122284_1_48558
                        implementObtainDockingDeptInfoComReqDto.setOrderNumberFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getOrderNumberFields());//SimpleFieldAssign//sourceId:1121915_1_48558
                        implementObtainDockingDeptInfoComReqDto.setTypeDictionaryFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getTypeDictionaryFields());//SimpleFieldAssign//sourceId:1121916_1_48558
                    }

                    /*D1-执行获取组织架构系统对接部门信息(公共)[7393]   */
                    Assert.isNull(implementObtainDockingDeptInfoComReqDto.getThirdServiceAddress(), "D1-执行组织架构API对接部门信息-D1-执行获取组织架构系统对接部门信息(公共)-第三方服务接口地址不能为空", false);
                    Assert.isNull(implementObtainDockingDeptInfoComReqDto.getInterfaceMethod(), "D1-执行组织架构API对接部门信息-D1-执行获取组织架构系统对接部门信息(公共)-接口请求类型不能为空", false);
                    Assert.isNull(implementObtainDockingDeptInfoComReqDto.getDeptCodeFields(), "D1-执行组织架构API对接部门信息-D1-执行获取组织架构系统对接部门信息(公共)-部门编码字段名不能为空", false);
                    Assert.isNull(implementObtainDockingDeptInfoComReqDto.getDeptNameFields(), "D1-执行组织架构API对接部门信息-D1-执行获取组织架构系统对接部门信息(公共)-部门中文名称字段名不能为空", false);
                    implementObtainDockingDeptInfoComRespDto = implementObtainDockingDeptInfoCom(implementObtainDockingDeptInfoComReqDto)/*vcase invoke 同服务,同domain*/;


                }
                if ((implementObtainDockingDeptInfoComRespDto != null && implementObtainDockingDeptInfoComRespDto.getDockingDeptInfoList() != null && implementObtainDockingDeptInfoComRespDto.getDockingDeptInfoList().size() > 0)) {
                    //if(D1-执行获取组织架构系统对接部门信息(公共).组织架构系统对接部门信息列表数据集条数 大于 0)  48559

                    QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_4 = null;
                    QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto_2 = new QueryConfItemMatchAnswerDetailComReqDto();
                    queryConfItemMatchAnswerDetailComReqDto_2.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122654_1_48560
                    queryConfItemMatchAnswerDetailComReqDto_2.setResultAspObjType("TENANT_SPACE");//sourceId:1122653_1_48560
                    queryConfItemMatchAnswerDetailComReqDto_2.setConfItemCode("DEPT_DATA_IS_INTACT");//CUSTOM_CONVENTION//sourceId:1122652_1_48560
                    queryConfItemMatchAnswerDetailComReqDto_2.setIsPlatData("FALSE");//sourceId:1122661_1_48560

                    /*D2-3查数据对接部门数据是否完整[2486]   */
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_2.getResultAspObjId(), "D1-执行组织架构API对接部门信息-D2-3查数据对接部门数据是否完整-开通对象ID不能为空", false);
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_2.getResultAspObjType(), "D1-执行组织架构API对接部门信息-D2-3查数据对接部门数据是否完整-开通对象类型编码不能为空", false);
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_2.getConfItemCode(), "D1-执行组织架构API对接部门信息-D2-3查数据对接部门数据是否完整-配置项标识不能为空", false);
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_2.getIsPlatData(), "D1-执行组织架构API对接部门信息-D2-3查数据对接部门数据是否完整-是否标准答案不能为空", false);
                    queryConfItemMatchAnswerDetailComRespDto_4 = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto_2).getData()/*vcase invoke 跨dubbo调用;*/;


                    boolean bOOLEAN;
                    if (implementObtainDockingDeptInfoComRespDto != null && queryConfItemMatchAnswerDetailComRespDto_4 != null) {
                        List<DepartSourceData> listDepartSourceData_2 = new ArrayList<>();
                        if (implementObtainDockingDeptInfoComRespDto != null && implementObtainDockingDeptInfoComRespDto.getDockingDeptInfoList() != null && !CollectionUtil.isEmpty(implementObtainDockingDeptInfoComRespDto.getDockingDeptInfoList())) {
                            QueryConfItemMatchAnswerDetailComRespDto finalQueryConfItemMatchAnswerDetailComRespDto_ = queryConfItemMatchAnswerDetailComRespDto_4;
                            listDepartSourceData_2 = //objList-to-objLists
                                    implementObtainDockingDeptInfoComRespDto.getDockingDeptInfoList().stream().map(item -> {
                                        DepartSourceData elm = new DepartSourceData();
                                        if (item != null) {
                                            elm.setDeptNumber(item.getDeptNumber());//SimpleFieldAssign//sourceId:234151_2_48561
                                            elm.setDeptName(item.getDeptName());//SimpleFieldAssign//sourceId:234152_2_48561
                                            elm.setDeptEnName(item.getDeptEnName());//SimpleFieldAssign//sourceId:234153_2_48561
                                            elm.setDeptShortName(item.getDeptShortName());//SimpleFieldAssign//sourceId:234154_2_48561
                                            elm.setParentDeptNumber(item.getParentDeptNumber());//SimpleFieldAssign//sourceId:234155_2_48561
                                            elm.setParentDeptName(item.getParentDeptName());//SimpleFieldAssign//sourceId:234156_2_48561
                                            elm.setTypeDictionaryName(item.getTypeDictionaryName());//SimpleFieldAssign//sourceId:234157_2_48561
                                            elm.setDeptLeaderCode(item.getDeptLeaderCode());//SimpleFieldAssign//sourceId:234160_2_48561
                                            elm.setDeptLeaderName(item.getDeptLeaderName());//SimpleFieldAssign//sourceId:234161_2_48561
                                            elm.setDirectorCode(item.getDirectorCode());//SimpleFieldAssign//sourceId:234163_2_48561
                                            elm.setDirectorName(item.getDirectorName());//SimpleFieldAssign//sourceId:234159_2_48561
                                            elm.setPartyAndYouthDirectorCode(item.getPartyAndYouthDirectorCode());//SimpleFieldAssign//sourceId:234162_2_48561
                                            elm.setPartyAndYouthDirectorName(item.getPartyAndYouthDirectorName());//SimpleFieldAssign//sourceId:234158_2_48561
                                            elm.setOrderNumber(item.getOrderNumber());//SimpleFieldAssign//sourceId:234164_2_48561
                                        }
                                        if (finalQueryConfItemMatchAnswerDetailComRespDto_ != null) {
                                            elm.setDataIsComplete(finalQueryConfItemMatchAnswerDetailComRespDto_.getEndValue());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:234165_2_48561
                                        }
                                        if (reqDto != null) {
                                            elm.setProjectId(reqDto.getProjectId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:234166_2_48561
                                        }
                                        return elm;
                                    }).collect(Collectors.toList());//objList-to-objLists//sourceId:1122094_1_48561
                        }

                        /*1-3-17批量增系统对接部门源数据[7401]   */

                        bOOLEAN = mDepartSourceDataService.batchAddSystemDockingDeptSourceData(listDepartSourceData_2)/*vcase invoke 本地 method 方法调用;*/;


                    }
                }
            }
        } else {
            //else  48529

//processBranchName:正常结束 ,processBranchId:48530

        }
        ImplementOrgImportDeptDataByApiRespDto retData = new ImplementOrgImportDeptDataByApiRespDto();


        return retData;
    }

    /**
     * D1-执行组织架构API对接员工信息[7414]
     * gen by moon at 9/16/2023, 3:04:29 PM
     */
    @Trace(operationName = "D1-执行组织架构API对接员工信息")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementApiDockingPersonInfoRespDto implementApiDockingPersonInfo(ImplementApiDockingPersonInfoReqDto reqDto) {


        //virtualUsage D2-3查组织架构系统对接方式配置  48532
        QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto = null;
        QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto = new QueryConfItemMatchAnswerDetailComReqDto();
        queryConfItemMatchAnswerDetailComReqDto.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122320_1_48532
        queryConfItemMatchAnswerDetailComReqDto.setConfItemCode("ORG_DOCKING");//CUSTOM_CONVENTION//sourceId:1122321_1_48532
        queryConfItemMatchAnswerDetailComReqDto.setIsPlatData("FALSE");//sourceId:1122322_1_48532

        /*D2-3查组织架构系统对接方式配置[2486]   */
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getResultAspObjId(), "D1-执行组织架构API对接员工信息-D2-3查组织架构系统对接方式配置-开通对象ID不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getConfItemCode(), "D1-执行组织架构API对接员工信息-D2-3查组织架构系统对接方式配置-配置项标识不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getIsPlatData(), "D1-执行组织架构API对接员工信息-D2-3查组织架构系统对接方式配置-是否标准答案不能为空", false);
        queryConfItemMatchAnswerDetailComRespDto = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        if ((queryConfItemMatchAnswerDetailComRespDto != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue() != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue().equals("ORG_API_DOCKING") || queryConfItemMatchAnswerDetailComRespDto != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue() != null && queryConfItemMatchAnswerDetailComRespDto.getEndValue().equals("ORG_API_EXCEL_DOCKING"))) {
            //if((D2-3查组织架构对接方式配置答案.答案值 等于 API对接 or D2-3查组织架构对接方式配置答案.答案值 等于 API与Excel混合))  48537

            List<PersonSourceData> listPersonSourceData = new ArrayList<>();
            QuerySystemDockingPersonSourceDataListReq querySystemDockingPersonSourceDataListReq = new QuerySystemDockingPersonSourceDataListReq();
            querySystemDockingPersonSourceDataListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122282_1_48538
            if (reqDto != null) {
                querySystemDockingPersonSourceDataListReq.setProjectId(reqDto.getProjectId());//SimpleFieldAssign//sourceId:1122096_1_48538
            }

            /*1-3-18查询员工源数据列表（用于判断是否进入API对接）[7406]   */
            Assert.isNull(querySystemDockingPersonSourceDataListReq.getProjectId(), "D1-执行组织架构API对接员工信息-1-3-18查询员工源数据列表（用于判断是否进入API对接）-关联项目ID不能为空", false);
            Assert.isNull(querySystemDockingPersonSourceDataListReq.getSpaceId(), "D1-执行组织架构API对接员工信息-1-3-18查询员工源数据列表（用于判断是否进入API对接）-创建于空间ID不能为空", false);
            listPersonSourceData = mPersonSourceDataService.querySystemDockingPersonSourceDataList(querySystemDockingPersonSourceDataListReq)/*vcase invoke 本地 method 方法调用;*/;


            if ((listPersonSourceData != null && listPersonSourceData != null && listPersonSourceData.size() == 0)) {
                //if(1-3-18查询员工源数据列表（用于判断是否进入API对接）.员工源数据列表数据集条数 等于 0)  48539

                QueryItemMatchMultiSelectResultToAnswerListComRespDto queryItemMatchMultiSelectResultToAnswerListComRespDto = null;
                QueryItemMatchMultiSelectResultToAnswerListComReqDto queryItemMatchMultiSelectResultToAnswerListComReqDto = new QueryItemMatchMultiSelectResultToAnswerListComReqDto();
                queryItemMatchMultiSelectResultToAnswerListComReqDto.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1123690_1_48578
                queryItemMatchMultiSelectResultToAnswerListComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:1123691_1_48578
                queryItemMatchMultiSelectResultToAnswerListComReqDto.setConfItemCode("ORG_API_URL");//CUSTOM_CONVENTION//sourceId:1123692_1_48578
                queryItemMatchMultiSelectResultToAnswerListComReqDto.setIsPlatData("FALSE");//sourceId:1123693_1_48578

                /*D2-3查组织架构对接API地址&接口请求类型[5196]   */
                Assert.isNull(queryItemMatchMultiSelectResultToAnswerListComReqDto.getResultAspObjId(), "D1-执行组织架构API对接员工信息-D2-3查组织架构对接API地址&接口请求类型-开通对象ID不能为空", false);
                Assert.isNull(queryItemMatchMultiSelectResultToAnswerListComReqDto.getResultAspObjType(), "D1-执行组织架构API对接员工信息-D2-3查组织架构对接API地址&接口请求类型-开通对象类型编码不能为空", false);
                Assert.isNull(queryItemMatchMultiSelectResultToAnswerListComReqDto.getConfItemCode(), "D1-执行组织架构API对接员工信息-D2-3查组织架构对接API地址&接口请求类型-配置项标识不能为空", false);
                Assert.isNull(queryItemMatchMultiSelectResultToAnswerListComReqDto.getIsPlatData(), "D1-执行组织架构API对接员工信息-D2-3查组织架构对接API地址&接口请求类型-是否标准答案不能为空", false);
                queryItemMatchMultiSelectResultToAnswerListComRespDto = confSchemeService.queryItemMatchMultiSelectResultToAnswerListCom(queryItemMatchMultiSelectResultToAnswerListComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_2 = null;
                QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto_1 = new QueryConfItemMatchAnswerDetailComReqDto();
                queryConfItemMatchAnswerDetailComReqDto_1.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122675_1_48552
                queryConfItemMatchAnswerDetailComReqDto_1.setConfItemCode("ORG_API_DOCKING_KEY");//CUSTOM_CONVENTION//sourceId:1122673_1_48552
                queryConfItemMatchAnswerDetailComReqDto_1.setIsPlatData("FALSE");//sourceId:1122682_1_48552

                /*D2-3查员工系统对接API地址[2486]   */
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getResultAspObjId(), "D1-执行组织架构API对接员工信息-D2-3查员工系统对接API地址-开通对象ID不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getConfItemCode(), "D1-执行组织架构API对接员工信息-D2-3查员工系统对接API地址-配置项标识不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getIsPlatData(), "D1-执行组织架构API对接员工信息-D2-3查员工系统对接API地址-是否标准答案不能为空", false);
                queryConfItemMatchAnswerDetailComRespDto_2 = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


                QueryItemMatchResultOptionToAnswerDetailComRespDto queryItemMatchResultOptionToAnswerDetailComRespDto = null;
                QueryItemMatchResultOptionToAnswerDetailComReqDto queryItemMatchResultOptionToAnswerDetailComReqDto = new QueryItemMatchResultOptionToAnswerDetailComReqDto();
                queryItemMatchResultOptionToAnswerDetailComReqDto.setConfItemCode("STAFF_FIELDS_SHIFT");//CUSTOM_CONVENTION//sourceId:1122441_1_48545
                queryItemMatchResultOptionToAnswerDetailComReqDto.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122442_1_48545
                queryItemMatchResultOptionToAnswerDetailComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:1122443_1_48545
                queryItemMatchResultOptionToAnswerDetailComReqDto.setIsPlatData("FALSE");//sourceId:1122444_1_48545
                queryItemMatchResultOptionToAnswerDetailComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1122446_1_48545

                /*D2-3查员工字段转换配置[5991]   */
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getConfItemCode(), "D1-执行组织架构API对接员工信息-D2-3查员工字段转换配置-配置项标识不能为空", false);
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getResultAspObjId(), "D1-执行组织架构API对接员工信息-D2-3查员工字段转换配置-开通对象ID不能为空", false);
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getResultAspObjType(), "D1-执行组织架构API对接员工信息-D2-3查员工字段转换配置-开通对象类型编码不能为空", false);
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getIsPlatData(), "D1-执行组织架构API对接员工信息-D2-3查员工字段转换配置-是否标准答案不能为空", false);
                Assert.isNull(queryItemMatchResultOptionToAnswerDetailComReqDto.getSubjectLifeCycle(), "D1-执行组织架构API对接员工信息-D2-3查员工字段转换配置-主体生命周期不能为空", false);
                queryItemMatchResultOptionToAnswerDetailComRespDto = confSchemeService.queryItemMatchResultOptionToAnswerDetailCom(queryItemMatchResultOptionToAnswerDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                ImplementObtainDockingPersonInfoComRespDto implementObtainDockingPersonInfoComRespDto = null;
                if (queryItemMatchMultiSelectResultToAnswerListComRespDto != null && queryConfItemMatchAnswerDetailComRespDto_2 != null && queryItemMatchResultOptionToAnswerDetailComRespDto != null) {
                    ImplementObtainDockingPersonInfoComReqDto implementObtainDockingPersonInfoComReqDto = new ImplementObtainDockingPersonInfoComReqDto();
                    if (queryItemMatchMultiSelectResultToAnswerListComRespDto != null) {
                        implementObtainDockingPersonInfoComReqDto.setThirdServiceAddress(queryItemMatchMultiSelectResultToAnswerListComRespDto.getStaffApiUrl());//SimpleFieldAssign//sourceId:1122502_1_48549
                        implementObtainDockingPersonInfoComReqDto.setInterfaceMethod(queryItemMatchMultiSelectResultToAnswerListComRespDto.getInterfaceMethod());//SimpleFieldAssign//sourceId:1123728_1_48549
                    }
                    if (queryConfItemMatchAnswerDetailComRespDto_2 != null) {
                        implementObtainDockingPersonInfoComReqDto.setOrgApiDockingKey(queryConfItemMatchAnswerDetailComRespDto_2.getEndValue());//SimpleFieldAssign//sourceId:1123729_1_48549
                    }
                    if (queryItemMatchResultOptionToAnswerDetailComRespDto != null) {
                        implementObtainDockingPersonInfoComReqDto.setOrgApiDockingKeyFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getOrgApiDockingKeyFields());//SimpleFieldAssign//sourceId:1123730_1_48549
                        implementObtainDockingPersonInfoComReqDto.setRoleMemberCodeFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getRoleMemberCodeFields());//SimpleFieldAssign//sourceId:1122490_1_48549
                        implementObtainDockingPersonInfoComReqDto.setIdNumberFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getIdNumberFields());//SimpleFieldAssign//sourceId:1122494_1_48549
                        implementObtainDockingPersonInfoComReqDto.setNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getNameFields());//SimpleFieldAssign//sourceId:1122491_1_48549
                        implementObtainDockingPersonInfoComReqDto.setPhoneFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getPhoneFields());//SimpleFieldAssign//sourceId:1122495_1_48549
                        implementObtainDockingPersonInfoComReqDto.setSexFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getSexFields());//SimpleFieldAssign//sourceId:1122496_1_48549
                        implementObtainDockingPersonInfoComReqDto.setPositionIdNameFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getPositionIdNameFields());//SimpleFieldAssign//sourceId:1122492_1_48549
                        implementObtainDockingPersonInfoComReqDto.setPositionTypeFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getPositionTypeFields());//SimpleFieldAssign//sourceId:1122497_1_48549
                        implementObtainDockingPersonInfoComReqDto.setIsDirectorFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getIsDirectorFields());//SimpleFieldAssign//sourceId:1122499_1_48549
                        implementObtainDockingPersonInfoComReqDto.setIsMainInductionFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getIsMainInductionFields());//SimpleFieldAssign//sourceId:1122498_1_48549
                        implementObtainDockingPersonInfoComReqDto.setInductionStartTimeFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getInductionStartTimeFields());//SimpleFieldAssign//sourceId:1122500_1_48549
                        implementObtainDockingPersonInfoComReqDto.setSubordinateDeptFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getSubordinateDeptFields());//SimpleFieldAssign//sourceId:1122493_1_48549
                        implementObtainDockingPersonInfoComReqDto.setOrderNumberFields(queryItemMatchResultOptionToAnswerDetailComRespDto.getOrderNumberFields());//SimpleFieldAssign//sourceId:1122501_1_48549
                    }

                    /*D1-执行获取组织架构系统对接员工信息(公共)[7394]   */
                    Assert.isNull(implementObtainDockingPersonInfoComReqDto.getThirdServiceAddress(), "D1-执行组织架构API对接员工信息-D1-执行获取组织架构系统对接员工信息(公共)-第三方服务接口地址不能为空", false);
                    Assert.isNull(implementObtainDockingPersonInfoComReqDto.getRoleMemberCodeFields(), "D1-执行组织架构API对接员工信息-D1-执行获取组织架构系统对接员工信息(公共)-工号字段名不能为空", false);
                    Assert.isNull(implementObtainDockingPersonInfoComReqDto.getNameFields(), "D1-执行组织架构API对接员工信息-D1-执行获取组织架构系统对接员工信息(公共)-姓名字段名不能为空", false);
                    Assert.isNull(implementObtainDockingPersonInfoComReqDto.getPositionIdNameFields(), "D1-执行组织架构API对接员工信息-D1-执行获取组织架构系统对接员工信息(公共)-职务名称字段名不能为空", false);
                    implementObtainDockingPersonInfoComRespDto = implementObtainDockingPersonInfoCom(implementObtainDockingPersonInfoComReqDto)/*vcase invoke 同服务,同domain*/;


                }
                if ((implementObtainDockingPersonInfoComRespDto != null && implementObtainDockingPersonInfoComRespDto.getDockingPersonInfoList() != null && implementObtainDockingPersonInfoComRespDto.getDockingPersonInfoList().size() > 0)) {
                    //if(D1-执行获取组织架构系统对接员工信息(公共).组织架构系统对接员工信息列表数据集条数 大于 0)  48579

                    QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_4 = null;
                    QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto_2 = new QueryConfItemMatchAnswerDetailComReqDto();
                    queryConfItemMatchAnswerDetailComReqDto_2.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1122711_1_48580
                    queryConfItemMatchAnswerDetailComReqDto_2.setConfItemCode("STAFF_DATA_IS_INTACT");//CUSTOM_CONVENTION//sourceId:1122709_1_48580
                    queryConfItemMatchAnswerDetailComReqDto_2.setIsPlatData("FALSE");//sourceId:1122718_1_48580

                    /*D2-3查组织架构系统对接员工数据是否完整配置[2486]   */
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_2.getResultAspObjId(), "D1-执行组织架构API对接员工信息-D2-3查组织架构系统对接员工数据是否完整配置-开通对象ID不能为空", false);
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_2.getConfItemCode(), "D1-执行组织架构API对接员工信息-D2-3查组织架构系统对接员工数据是否完整配置-配置项标识不能为空", false);
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_2.getIsPlatData(), "D1-执行组织架构API对接员工信息-D2-3查组织架构系统对接员工数据是否完整配置-是否标准答案不能为空", false);
                    queryConfItemMatchAnswerDetailComRespDto_4 = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto_2).getData()/*vcase invoke 跨dubbo调用;*/;


                    boolean bOOLEAN;
                    if (implementObtainDockingPersonInfoComRespDto != null && queryConfItemMatchAnswerDetailComRespDto_4 != null) {
                        List<PersonSourceData> listPersonSourceData_2 = new ArrayList<>();
                        if (implementObtainDockingPersonInfoComRespDto != null && implementObtainDockingPersonInfoComRespDto.getDockingPersonInfoList() != null && !CollectionUtil.isEmpty(implementObtainDockingPersonInfoComRespDto.getDockingPersonInfoList())) {
                            QueryConfItemMatchAnswerDetailComRespDto finalQueryConfItemMatchAnswerDetailComRespDto_ = queryConfItemMatchAnswerDetailComRespDto_4;
                            listPersonSourceData_2 = //objList-to-objLists
                                    implementObtainDockingPersonInfoComRespDto.getDockingPersonInfoList().stream().map(item -> {
                                        PersonSourceData elm = new PersonSourceData();
                                        elm.setSubjectLifeCycle("EDITING");//sourceId:234256_2_48581
                                        if (item != null) {
                                            elm.setRoleMemberCode(item.getRoleMemberCode());//SimpleFieldAssign//sourceId:234242_2_48581
                                            elm.setIdCardName(item.getIdCardName());//SimpleFieldAssign//sourceId:234243_2_48581
                                            elm.setPhone(item.getPhone());//SimpleFieldAssign//sourceId:234244_2_48581
                                            elm.setSex(item.getSex() != null ? String.valueOf(item.getSex()) : "");//SimpleFieldAssign//sourceId:234245_2_48581
                                            elm.setPositionType(item.getPositionType() != null ? String.valueOf(item.getPositionType()) : "");//SimpleFieldAssign//sourceId:234246_2_48581
                                            elm.setPositionIdName(item.getPositionIdName());//SimpleFieldAssign//sourceId:234247_2_48581
                                            elm.setIsMainInduction(item.getIsMainInduction() != null ? String.valueOf(item.getIsMainInduction()) : "");//SimpleFieldAssign//sourceId:234248_2_48581
                                            elm.setIsDirector(item.getIsDirector() != null ? String.valueOf(item.getIsDirector()) : "");//SimpleFieldAssign//sourceId:234249_2_48581
                                            elm.setDeptNumber(item.getDeptNumber());//SimpleFieldAssign//sourceId:234250_2_48581
                                            elm.setDeptName(item.getDeptName());//SimpleFieldAssign//sourceId:234251_2_48581
                                            elm.setInductionStartTime(item.getInductionStartTime());//SimpleFieldAssign//sourceId:234252_2_48581
                                            elm.setOrderNumber(item.getOrderNumber());//SimpleFieldAssign//sourceId:234253_2_48581
                                        }
                                        if (finalQueryConfItemMatchAnswerDetailComRespDto_ != null) {
                                            elm.setDataIsComplete(finalQueryConfItemMatchAnswerDetailComRespDto_.getEndValue());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:234254_2_48581
                                        }
                                        if (reqDto != null) {
                                            elm.setProjectId(reqDto.getProjectId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:234255_2_48581
                                        }
                                        return elm;
                                    }).collect(Collectors.toList());//objList-to-objLists//sourceId:1122504_1_48581
                        }

                        /*1-3-18批量增系统对接员工源数据[7404]   */

                        bOOLEAN = mPersonSourceDataService.batchAddSystemDockingPersonSourceData(listPersonSourceData_2)/*vcase invoke 本地 method 方法调用;*/;


                    }
                }
            } else if ((listPersonSourceData != null && listPersonSourceData != null && listPersonSourceData.size() > 0)) {
                //elseif(1-3-18查询员工源数据列表（用于判断是否进入API对接）.员工源数据列表数据集条数 大于 0)  48540

//processBranchName:正常结束 ,processBranchId:48541

            }
        }
        ImplementApiDockingPersonInfoRespDto retData = new ImplementApiDockingPersonInfoRespDto();


        return retData;
    }

    /**
     * D1执行清除部门主管(公共)[7432]
     * gen by moon at 9/25/2023, 10:46:34 AM
     */
    @Trace(operationName = "D1执行清除部门主管(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementClearDeptDirectorComRespDto implementClearDeptDirectorCom(ImplementClearDeptDirectorComReqDto reqDto) {


        //virtualUsage M1约定置空字段值  48911
        //ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes = null;
        QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
        receptionServiceReq.setCustomField("--");//CUSTOM_CONVENTION//sourceId:1135344_1_48911

        /*M1约定置空字段值[3715]  用于特殊方法接收上游入参。 */

        receptionServiceRes = nbOrg.queryReceiveFieldDetail(receptionServiceReq);


//virtualUsage 1-3-09查询部门详情  48918
        Dept dept = null;
        QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
        if (reqDto != null) {
            queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1135381_1_48918
        }

        /*1-3-09查询部门详情[218]   */
        Assert.isNull(queryDeptDetailReq.getDeptId(), "D1执行清除部门主管(公共)-1-3-09查询部门详情-部门ID不能为空", false);
        dept = mDeptService.queryDeptDetail(queryDeptDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        if ((reqDto != null && reqDto.getIsXzDirector() != null && reqDto.getIsXzDirector().equals("FALSE") && dept != null && dept.getDirectorIdCardName() != null)) {
            //if((D1执行清除部门主管(公共).是否行政主管 等于 否 and 1-3-09查询部门详情.行政主管的姓名 值不等于空 ))  48907

            ImplementTwoValuesIsEqualityComRespDto implementTwoValuesIsEqualityComRespDto = null;
            if (dept != null) {
                ImplementTwoValuesIsEqualityComReqDto implementTwoValuesIsEqualityComReqDto = new ImplementTwoValuesIsEqualityComReqDto();
                if (reqDto != null) {
                    implementTwoValuesIsEqualityComReqDto.setCustomField(reqDto.getIdCardName());//SimpleFieldAssign//sourceId:1135377_1_48912
                }
                if (dept != null) {
                    implementTwoValuesIsEqualityComReqDto.setCustomField1(dept.getDirectorIdCardName());//SimpleFieldAssign//sourceId:1135378_1_48912
                }

                /*D2执行两个值比较是否相等(公共)[6425]   */
                Assert.isNull(implementTwoValuesIsEqualityComReqDto.getCustomField(), "D1执行清除部门主管(公共)-D2执行两个值比较是否相等(公共)-自定义字段不能为空", false);
                Assert.isNull(implementTwoValuesIsEqualityComReqDto.getCustomField1(), "D1执行清除部门主管(公共)-D2执行两个值比较是否相等(公共)-自定义字段1不能为空", false);
                implementTwoValuesIsEqualityComRespDto = interfaceModeService.implementTwoValuesIsEqualityCom(implementTwoValuesIsEqualityComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            }
            if ((implementTwoValuesIsEqualityComRespDto != null && implementTwoValuesIsEqualityComRespDto.getTureOrFalse() != null && implementTwoValuesIsEqualityComRespDto.getTureOrFalse().equals("TRUE"))) {
                //if(D2执行两个值比较是否相等(公共).是否相等 等于 是)  48913

                boolean bOOLEAN;
                Dept dept_2 = new Dept();
                if (reqDto != null) {
                    dept_2.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1135373_1_48914
                }
                if (receptionServiceRes != null) {
                    dept_2.setDirectorIdCardName(receptionServiceRes.getCustomField());//SimpleFieldAssign//sourceId:1135374_1_48914
                }

                /*1-3-09修改部门[215]   */
                Assert.isNull(dept_2.getDeptId(), "D1执行清除部门主管(公共)-1-3-09修改部门-部门ID不能为空", false);
                bOOLEAN = mDeptService.updateDept(dept_2)/*vcase invoke 本地 method 方法调用;*/;


            }
        } else if ((reqDto != null && reqDto.getIsXzDirector() != null && reqDto.getIsXzDirector().equals("TRUE") && dept != null && dept.getPartyAndYouthDirectorIdCardName() != null)) {
            //elseif((D1执行清除部门主管(公共).是否行政主管 等于 是 and 1-3-09查询部门详情.党团主管的姓名 值不等于空 ))  48908

            ImplementTwoValuesIsEqualityComRespDto implementTwoValuesIsEqualityComRespDto_2 = null;
            if (dept != null) {
                ImplementTwoValuesIsEqualityComReqDto implementTwoValuesIsEqualityComReqDto_1 = new ImplementTwoValuesIsEqualityComReqDto();
                if (reqDto != null) {
                    implementTwoValuesIsEqualityComReqDto_1.setCustomField(reqDto.getIdCardName());//SimpleFieldAssign//sourceId:1135377_1_48915
                }
                if (dept != null) {
                    implementTwoValuesIsEqualityComReqDto_1.setCustomField1(dept.getPartyAndYouthDirectorIdCardName());//SimpleFieldAssign//sourceId:1135378_1_48915
                }

                /*D2执行两个值比较是否相等(公共)[6425]   */
                Assert.isNull(implementTwoValuesIsEqualityComReqDto_1.getCustomField(), "D1执行清除部门主管(公共)-D2执行两个值比较是否相等(公共)-自定义字段不能为空", false);
                Assert.isNull(implementTwoValuesIsEqualityComReqDto_1.getCustomField1(), "D1执行清除部门主管(公共)-D2执行两个值比较是否相等(公共)-自定义字段1不能为空", false);
                implementTwoValuesIsEqualityComRespDto_2 = interfaceModeService.implementTwoValuesIsEqualityCom(implementTwoValuesIsEqualityComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


            }
            if ((implementTwoValuesIsEqualityComRespDto_2 != null && implementTwoValuesIsEqualityComRespDto_2.getTureOrFalse() != null && implementTwoValuesIsEqualityComRespDto_2.getTureOrFalse().equals("TRUE"))) {
                //if(D2执行两个值比较是否相等(公共).是否相等 等于 是)  48916

                boolean bOOLEAN_1;
                Dept dept_3 = new Dept();
                if (reqDto != null) {
                    dept_3.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1135373_1_48917
                }
                if (receptionServiceRes != null) {
                    dept_3.setPartyAndYouthDirectorIdCardName(receptionServiceRes.getCustomField());//SimpleFieldAssign//sourceId:1135375_1_48917
                }

                /*1-3-09修改部门[215]   */
                Assert.isNull(dept_3.getDeptId(), "D1执行清除部门主管(公共)-1-3-09修改部门-部门ID不能为空", false);
                bOOLEAN_1 = mDeptService.updateDept(dept_3)/*vcase invoke 本地 method 方法调用;*/;


            }
        }
        ImplementClearDeptDirectorComRespDto retData = new ImplementClearDeptDirectorComRespDto();


        return retData;
    }

    /**
     * D1批量查询部门(公共)[7511]
     * gen by moon at 4/2/2024, 11:34:23 PM
     */
    @Trace(operationName = "D1批量查询部门(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public BatchQueryDeptComRespDto batchQueryDeptCom(BatchQueryDeptComReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//步骤0: 1-3-09批量查询部门列表 - batchQueryDeptList
        List<Dept> listDept = new ArrayList<>();
        BatchQueryDeptListReq batchQueryDeptListReq = new BatchQueryDeptListReq();
        batchQueryDeptListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1168189_1
        if (reqDto != null) {
            batchQueryDeptListReq.setDeptList(reqDto.getDeptList());//list-field-assign//sourceId:1168185_1
            batchQueryDeptListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1168188_1
        }

        /*1-3-09批量查询部门列表[1153]   */
        Assert.isNull(batchQueryDeptListReq.getSpaceId(), "D1批量查询部门(公共)-1-3-09批量查询部门列表-创建于空间ID不能为空", false);
        listDept = mDeptService.batchQueryDeptList(batchQueryDeptListReq)/*vcase invoke 本地 method 方法调用;*/;


        listDept_1 = listDept;

        BatchQueryDeptComRespDto retData = new BatchQueryDeptComRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1168192_1


        return retData;
    }

    /**
     * D1获取部门管理员及正副职(公共)[7535]
     * gen by moon at 10/15/2023, 3:52:37 AM
     */
    @Trace(operationName = "D1获取部门管理员及正副职(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ObtainDeptAdminAndDeputyComRespDto obtainDeptAdminAndDeputyCom(ObtainDeptAdminAndDeputyComReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_1 = null;
//virtualUsage D1执行按条件查部门正副职(公共)  50086
        ImplementAccConditionQueryDeptDeputyComRespDto implementAccConditionQueryDeptDeputyComRespDto = null;
        ImplementAccConditionQueryDeptDeputyComReqDto implementAccConditionQueryDeptDeputyComReqDto = new ImplementAccConditionQueryDeptDeputyComReqDto();
        if (reqDto != null) {
            implementAccConditionQueryDeptDeputyComReqDto.setDeptDeputyCondition(reqDto.getDeptDeputyCondition());//SimpleFieldAssign//sourceId:1175881_1_50086
            implementAccConditionQueryDeptDeputyComReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1175882_1_50086
        }

        /*D1执行按条件查部门正副职(公共)[7536]   */
        Assert.isNull(implementAccConditionQueryDeptDeputyComReqDto.getDeptDeputyCondition(), "D1获取部门管理员及正副职(公共)-D1执行按条件查部门正副职(公共)-部门管理者获取条件不能为空", false);
        Assert.isNull(implementAccConditionQueryDeptDeputyComReqDto.getDeptId(), "D1获取部门管理员及正副职(公共)-D1执行按条件查部门正副职(公共)-部门ID不能为空", false);
        implementAccConditionQueryDeptDeputyComRespDto = inductionRecordService.implementAccConditionQueryDeptDeputyCom(implementAccConditionQueryDeptDeputyComReqDto)/*vcase invoke isSameApp*/;


        if ((reqDto != null && reqDto.getDeptDeputyCondition() != null && reqDto.getDeptDeputyCondition().equals("All") || reqDto != null && reqDto.getDeptDeputyCondition() != null && reqDto.getDeptDeputyCondition().equals("ONLY_ADMIN"))) {
            //if((D1获取部门管理员及正副职(公共).部门管理者获取条件 等于 全部 or D1获取部门管理员及正副职(公共).部门管理者获取条件 等于 仅管理员))  50087

            Dept dept = null;
            QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
            queryDeptDetailReq.setIsArchive("FALSE");//sourceId:1175258_1_50088
            if (reqDto != null) {
                queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1175257_1_50088
            }

            /*1-3-09查当前部门层级[218]   */
            Assert.isNull(queryDeptDetailReq.getDeptId(), "D1获取部门管理员及正副职(公共)-1-3-09查当前部门层级-部门ID不能为空", false);
            Assert.isNull(queryDeptDetailReq.getIsArchive(), "D1获取部门管理员及正副职(公共)-1-3-09查当前部门层级-是否存档不能为空", false);
            dept = mDeptService.queryDeptDetail(queryDeptDetailReq)/*vcase invoke 本地 method 方法调用;*/;


            if ((dept != null && dept.getLevelNumber() != null && dept != null && dept.getLevelNumber() == 1L)) {
                //if((1-3-09查当前部门层级.层级 值不等于空  and 1-3-09查当前部门层级.层级 等于 1))  50089

                List<ManagedDept> listManagedDept = new ArrayList<>();
                QueryManageDeptListReq queryManageDeptListReq = new QueryManageDeptListReq();
                queryManageDeptListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1175198_1_50091
                if (reqDto != null) {
                    queryManageDeptListReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1175196_1_50091
                }

                /*1-2-14查询管理的部门列表[1152]   */
                Assert.isNull(queryManageDeptListReq.getDeptId(), "D1获取部门管理员及正副职(公共)-1-2-14查询管理的部门列表-部门ID不能为空", false);
                Assert.isNull(queryManageDeptListReq.getSpaceId(), "D1获取部门管理员及正副职(公共)-1-2-14查询管理的部门列表-创建于空间ID不能为空", false);
                listManagedDept = mManagedDeptService.queryManageDeptList(queryManageDeptListReq)/*vcase invoke 本地 method 方法调用;*/;


                List<OriginalRoleMember> listOriginalRoleMember = new ArrayList<>();
                if (listManagedDept != null && !CollectionUtil.isEmpty(listManagedDept) && listManagedDept.size() > 0) {
                    BatchQueryBeginMemberListReq batchQueryBeginMemberListReq = new BatchQueryBeginMemberListReq();
                    batchQueryBeginMemberListReq.setIsTransaction("FALSE");//sourceId:1175280_1_50092
                    batchQueryBeginMemberListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1175282_1_50092
                    if (listManagedDept != null && !CollectionUtil.isEmpty(listManagedDept) && listManagedDept != null && !CollectionUtil.isEmpty(listManagedDept)) {
                        batchQueryBeginMemberListReq.setBeginMemberList(listManagedDept.stream().map(item -> item.getOriginalRoleMemberId())
                                .collect(Collectors.toList()));/*list-to-strings*///sourceId:1175275_1_50092
                    }

                    /*1-2-09批量查询身份人员列表	[1181]   */
                    Assert.isNull(batchQueryBeginMemberListReq.getIsTransaction(), "D1获取部门管理员及正副职(公共)-1-2-09批量查询身份人员列表	-是否异动不能为空", false);
                    Assert.isNull(batchQueryBeginMemberListReq.getSpaceId(), "D1获取部门管理员及正副职(公共)-1-2-09批量查询身份人员列表	-创建于空间ID不能为空", false);
                    listOriginalRoleMember = mOriginalRoleMemberService.batchQueryBeginMemberList(batchQueryBeginMemberListReq)/*vcase invoke 本地 method 方法调用;*/;


                }
                ImplementUnionMultipleManyFieldsDataSetsComRespDto implementUnionMultipleManyFieldsDataSetsComRespDto = null;
                if (implementAccConditionQueryDeptDeputyComRespDto != null && listOriginalRoleMember != null && !CollectionUtil.isEmpty(listOriginalRoleMember) && listOriginalRoleMember.size() > 0) {
                    ImplementUnionMultipleManyFieldsDataSetsComReqDto implementUnionMultipleManyFieldsDataSetsComReqDto = new ImplementUnionMultipleManyFieldsDataSetsComReqDto();
                    if (implementAccConditionQueryDeptDeputyComRespDto != null && implementAccConditionQueryDeptDeputyComRespDto.getOrgInductionRecordList() != null && !CollectionUtil.isEmpty(implementAccConditionQueryDeptDeputyComRespDto.getOrgInductionRecordList())) {
                        implementUnionMultipleManyFieldsDataSetsComReqDto.setDataSetsListOne(//objList-to-objLists
                                implementAccConditionQueryDeptDeputyComRespDto.getOrgInductionRecordList().stream().map(item -> {
                                    DataSetsListOneDto elm = new DataSetsListOneDto();
                                    if (item != null) {
                                        elm.setCustomField(item.getUserId());//SimpleFieldAssign//sourceId:243784_2_50093
                                        elm.setComTxtField(item.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:243785_2_50093
                                    }
                                    return elm;
                                }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1175284_1_50093
                    }
                    if (listOriginalRoleMember != null && !CollectionUtil.isEmpty(listOriginalRoleMember) && listOriginalRoleMember != null && !CollectionUtil.isEmpty(listOriginalRoleMember)) {
                        implementUnionMultipleManyFieldsDataSetsComReqDto.setDataSetsListTwo(//objList-to-objLists
                                listOriginalRoleMember.stream().map(item -> {
                                    DataSetsListTwoDto elm = new DataSetsListTwoDto();
                                    elm.setCustomField(item.getUserId());//SimpleFieldAssign//sourceId:243787_2_50093
                                    elm.setComTxtField(item.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:243788_2_50093
                                    return elm;
                                }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1175285_1_50093
                    }

                    /*D2将部门正副职与管理员合并[5649]   */

                    implementUnionMultipleManyFieldsDataSetsComRespDto = interfaceModeService.implementUnionMultipleManyFieldsDataSetsCom(implementUnionMultipleManyFieldsDataSetsComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                }
                ImplementManyFieldsDataSetDuplicateRemovalComRespDto implementManyFieldsDataSetDuplicateRemovalComRespDto = null;
                if (implementUnionMultipleManyFieldsDataSetsComRespDto != null) {
                    ImplementManyFieldsDataSetDuplicateRemovalComReqDto implementManyFieldsDataSetDuplicateRemovalComReqDto = new ImplementManyFieldsDataSetDuplicateRemovalComReqDto();
                    if (implementUnionMultipleManyFieldsDataSetsComRespDto != null && implementUnionMultipleManyFieldsDataSetsComRespDto.getUnionMultipleDataSetsList() != null && !CollectionUtil.isEmpty(implementUnionMultipleManyFieldsDataSetsComRespDto.getUnionMultipleDataSetsList())) {
                        implementManyFieldsDataSetDuplicateRemovalComReqDto.setDataSetDuplicateRemovalList(//objList-to-objLists
                                implementUnionMultipleManyFieldsDataSetsComRespDto.getUnionMultipleDataSetsList().stream().map(item -> {
                                    DataSetDuplicateRemovalDto elm = new DataSetDuplicateRemovalDto();
                                    if (item != null) {
                                        elm.setCommPrimaryKey(item.getCustomField());//SimpleFieldAssign//sourceId:243926_2_50094
                                        elm.setCustomField1(item.getComTxtField());//SimpleFieldAssign//sourceId:243927_2_50094
                                    }
                                    return elm;
                                }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1175403_1_50094
                    }

                    /*D2执行数据集记录去重(公共)[7323]   */

                    implementManyFieldsDataSetDuplicateRemovalComRespDto = interfaceModeService.implementManyFieldsDataSetDuplicateRemovalCom(implementManyFieldsDataSetDuplicateRemovalComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                }
//ModelCode: receptionService
                QueryReceiveFieldDetailRespDto receptionServiceRes = null;
                if (implementManyFieldsDataSetDuplicateRemovalComRespDto != null) {
                    QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
                    if (implementManyFieldsDataSetDuplicateRemovalComRespDto != null && implementManyFieldsDataSetDuplicateRemovalComRespDto.getDataSetDuplicateRemovalList() != null && !CollectionUtil.isEmpty(implementManyFieldsDataSetDuplicateRemovalComRespDto.getDataSetDuplicateRemovalList())) {
                        receptionServiceReq.setDeptAdminAndDeputyList(//objList-to-objLists
                                implementManyFieldsDataSetDuplicateRemovalComRespDto.getDataSetDuplicateRemovalList().stream().map(item -> {
                                    DeptAdminAndDeputyDto elm = new DeptAdminAndDeputyDto();
                                    if (item != null) {
                                        elm.setUserId(item.getCommPrimaryKey());//SimpleFieldAssign//sourceId:244190_2_50104
                                        elm.setOriginalRoleMemberId(item.getCustomField1());//SimpleFieldAssign//sourceId:244189_2_50104
                                    }
                                    return elm;
                                }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1176278_1_50104
                    }

                    /*M1接收数据集出参[3715]  用于特殊方法接收上游入参。 */

                    receptionServiceRes = nbOrg.queryReceiveFieldDetail(receptionServiceReq);


                    receptionServiceRes_1 = receptionServiceRes;
                }
            } else if ((dept != null && dept.getLevelNumber() != null && dept != null && dept.getLevelNumber() > 1L)) {
                //elseif((1-3-09查当前部门层级.层级 值不等于空  and 1-3-09查当前部门层级.层级 大于 1))  50090

                List<InductionRecord> listInductionRecord = new ArrayList<>();
                QueryInductionRecordListReq queryInductionRecordListReq = new QueryInductionRecordListReq();
                queryInductionRecordListReq.setIsTransaction("FALSE");//sourceId:1175343_1_50097
                queryInductionRecordListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1175344_1_50097
                queryInductionRecordListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1175345_1_50097
                if (reqDto != null) {
                    queryInductionRecordListReq.setEntityId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1175342_1_50097
                }

                /*1-3-13查当前部门就职记录列表（用于查权限分配）[166]   */
                Assert.isNull(queryInductionRecordListReq.getEntityId(), "D1获取部门管理员及正副职(公共)-1-3-13查当前部门就职记录列表（用于查权限分配）-就职单位对象实例ID不能为空", false);
                Assert.isNull(queryInductionRecordListReq.getIsTransaction(), "D1获取部门管理员及正副职(公共)-1-3-13查当前部门就职记录列表（用于查权限分配）-是否异动不能为空", false);
                Assert.isNull(queryInductionRecordListReq.getSubjectLifeCycle(), "D1获取部门管理员及正副职(公共)-1-3-13查当前部门就职记录列表（用于查权限分配）-主体生命周期不能为空", false);
                Assert.isNull(queryInductionRecordListReq.getSpaceId(), "D1获取部门管理员及正副职(公共)-1-3-13查当前部门就职记录列表（用于查权限分配）-创建于空间ID不能为空", false);
                listInductionRecord = mInductionRecordService.queryInductionRecordList(queryInductionRecordListReq)/*vcase invoke 本地 method 方法调用;*/;


                List<PrivacyDistribution> listPrivacyDistribution = new ArrayList<>();
                if (listInductionRecord != null && !CollectionUtil.isEmpty(listInductionRecord) && listInductionRecord.size() > 0) {
                    BatchQueryTributPowerListReq batchQueryTributPowerListReq = new BatchQueryTributPowerListReq();
                    batchQueryTributPowerListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1175350_1_50098
                    batchQueryTributPowerListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1175356_1_50098
                    if (listInductionRecord != null && !CollectionUtil.isEmpty(listInductionRecord) && listInductionRecord != null && !CollectionUtil.isEmpty(listInductionRecord)) {
                        batchQueryTributPowerListReq.setTributPowerList(listInductionRecord.stream().map(item -> item.getInductionRecordId())
                                .collect(Collectors.toList()));/*list-to-strings*///sourceId:1175348_1_50098
                    }
                    if (reqDto != null) {
                        batchQueryTributPowerListReq.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:1175351_1_50098
                    }

                    /*1-2-12批量查部门个人权限分配列表[702]   */
                    Assert.isNull(batchQueryTributPowerListReq.getPrivacyCode(), "D1获取部门管理员及正副职(公共)-1-2-12批量查部门个人权限分配列表-权限标识不能为空", false);
                    Assert.isNull(batchQueryTributPowerListReq.getSubjectLifeCycle(), "D1获取部门管理员及正副职(公共)-1-2-12批量查部门个人权限分配列表-主体生命周期不能为空", false);
                    Assert.isNull(batchQueryTributPowerListReq.getSpaceId(), "D1获取部门管理员及正副职(公共)-1-2-12批量查部门个人权限分配列表-创建于空间ID不能为空", false);
                    listPrivacyDistribution = mPrivacyDistributionService.batchQueryTributPowerList(batchQueryTributPowerListReq)/*vcase invoke 本地 method 方法调用;*/;


                }
                List<InductionRecord> listInductionRecord_2 = new ArrayList<>();
                if (listPrivacyDistribution != null && !CollectionUtil.isEmpty(listPrivacyDistribution) && listPrivacyDistribution.size() > 0) {
                    BatchQueryInductionRecordListReq batchQueryInductionRecordListReq = new BatchQueryInductionRecordListReq();
                    batchQueryInductionRecordListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1175361_1_50099
                    if (listPrivacyDistribution != null && !CollectionUtil.isEmpty(listPrivacyDistribution) && listPrivacyDistribution != null && !CollectionUtil.isEmpty(listPrivacyDistribution)) {
                        batchQueryInductionRecordListReq.setPerOrgInductionRecordList(listPrivacyDistribution.stream().map(item -> item.getAllocationObjectId())
                                .collect(Collectors.toList()));/*list-to-strings*///sourceId:1175358_1_50099
                    }
                    if (reqDto != null) {
                        batchQueryInductionRecordListReq.setEntityId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1175369_1_50099
                    }

                    /*1-3-13批量查拥有管理权限的部门个人列表[601]   */
                    Assert.isNull(batchQueryInductionRecordListReq.getEntityId(), "D1获取部门管理员及正副职(公共)-1-3-13批量查拥有管理权限的部门个人列表-就职单位对象实例ID不能为空", false);
                    Assert.isNull(batchQueryInductionRecordListReq.getSubjectLifeCycle(), "D1获取部门管理员及正副职(公共)-1-3-13批量查拥有管理权限的部门个人列表-主体生命周期不能为空", false);
                    listInductionRecord_2 = mInductionRecordService.batchQueryInductionRecordList(batchQueryInductionRecordListReq)/*vcase invoke 本地 method 方法调用;*/;


                }
                ImplementUnionMultipleManyFieldsDataSetsComRespDto implementUnionMultipleManyFieldsDataSetsComRespDto_2 = null;
                if (implementAccConditionQueryDeptDeputyComRespDto != null && listInductionRecord_2 != null && !CollectionUtil.isEmpty(listInductionRecord_2) && listInductionRecord_2.size() > 0) {
                    ImplementUnionMultipleManyFieldsDataSetsComReqDto implementUnionMultipleManyFieldsDataSetsComReqDto_1 = new ImplementUnionMultipleManyFieldsDataSetsComReqDto();
                    if (implementAccConditionQueryDeptDeputyComRespDto != null && implementAccConditionQueryDeptDeputyComRespDto.getOrgInductionRecordList() != null && !CollectionUtil.isEmpty(implementAccConditionQueryDeptDeputyComRespDto.getOrgInductionRecordList())) {
                        implementUnionMultipleManyFieldsDataSetsComReqDto_1.setDataSetsListOne(//objList-to-objLists
                                implementAccConditionQueryDeptDeputyComRespDto.getOrgInductionRecordList().stream().map(item -> {
                                    DataSetsListOneDto elm = new DataSetsListOneDto();
                                    if (item != null) {
                                        elm.setCustomField(item.getUserId());//SimpleFieldAssign//sourceId:243784_2_50100
                                        elm.setComTxtField(item.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:243785_2_50100
                                    }
                                    return elm;
                                }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1175284_1_50100
                    }
                    if (listInductionRecord_2 != null && !CollectionUtil.isEmpty(listInductionRecord_2) && listInductionRecord_2 != null && !CollectionUtil.isEmpty(listInductionRecord_2)) {
                        implementUnionMultipleManyFieldsDataSetsComReqDto_1.setDataSetsListTwo(//objList-to-objLists
                                listInductionRecord_2.stream().map(item -> {
                                    DataSetsListTwoDto elm = new DataSetsListTwoDto();
                                    elm.setCustomField(item.getUserId());//SimpleFieldAssign//sourceId:243787_2_50100
                                    elm.setComTxtField(item.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:243788_2_50100
                                    return elm;
                                }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1175285_1_50100
                    }

                    /*D2将部门正副职与管理员合并[5649]   */

                    implementUnionMultipleManyFieldsDataSetsComRespDto_2 = interfaceModeService.implementUnionMultipleManyFieldsDataSetsCom(implementUnionMultipleManyFieldsDataSetsComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


                }
                ImplementManyFieldsDataSetDuplicateRemovalComRespDto implementManyFieldsDataSetDuplicateRemovalComRespDto_2 = null;
                if (implementUnionMultipleManyFieldsDataSetsComRespDto_2 != null) {
                    ImplementManyFieldsDataSetDuplicateRemovalComReqDto implementManyFieldsDataSetDuplicateRemovalComReqDto_1 = new ImplementManyFieldsDataSetDuplicateRemovalComReqDto();
                    if (implementUnionMultipleManyFieldsDataSetsComRespDto_2 != null && implementUnionMultipleManyFieldsDataSetsComRespDto_2.getUnionMultipleDataSetsList() != null && !CollectionUtil.isEmpty(implementUnionMultipleManyFieldsDataSetsComRespDto_2.getUnionMultipleDataSetsList())) {
                        implementManyFieldsDataSetDuplicateRemovalComReqDto_1.setDataSetDuplicateRemovalList(//objList-to-objLists
                                implementUnionMultipleManyFieldsDataSetsComRespDto_2.getUnionMultipleDataSetsList().stream().map(item -> {
                                    DataSetDuplicateRemovalDto elm = new DataSetDuplicateRemovalDto();
                                    if (item != null) {
                                        elm.setCommPrimaryKey(item.getCustomField());//SimpleFieldAssign//sourceId:243926_2_50101
                                        elm.setCustomField1(item.getComTxtField());//SimpleFieldAssign//sourceId:243927_2_50101
                                    }
                                    return elm;
                                }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1175403_1_50101
                    }

                    /*D2执行数据集记录去重(公共)[7323]   */

                    implementManyFieldsDataSetDuplicateRemovalComRespDto_2 = interfaceModeService.implementManyFieldsDataSetDuplicateRemovalCom(implementManyFieldsDataSetDuplicateRemovalComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


                }
//ModelCode: receptionService
                QueryReceiveFieldDetailRespDto receptionServiceRes_2 = null;
                if (implementManyFieldsDataSetDuplicateRemovalComRespDto_2 != null) {
                    QueryReceiveFieldDetailReqDto receptionServiceReq_1 = new QueryReceiveFieldDetailReqDto();
                    if (implementManyFieldsDataSetDuplicateRemovalComRespDto_2 != null && implementManyFieldsDataSetDuplicateRemovalComRespDto_2.getDataSetDuplicateRemovalList() != null && !CollectionUtil.isEmpty(implementManyFieldsDataSetDuplicateRemovalComRespDto_2.getDataSetDuplicateRemovalList())) {
                        receptionServiceReq_1.setDeptAdminAndDeputyList(//objList-to-objLists
                                implementManyFieldsDataSetDuplicateRemovalComRespDto_2.getDataSetDuplicateRemovalList().stream().map(item -> {
                                    DeptAdminAndDeputyDto elm = new DeptAdminAndDeputyDto();
                                    if (item != null) {
                                        elm.setUserId(item.getCommPrimaryKey());//SimpleFieldAssign//sourceId:244190_2_50105
                                        elm.setOriginalRoleMemberId(item.getCustomField1());//SimpleFieldAssign//sourceId:244189_2_50105
                                    }
                                    return elm;
                                }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1176278_1_50105
                    }

                    /*M1接收数据集出参[3715]  用于特殊方法接收上游入参。 */

                    receptionServiceRes_2 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_1);


                    receptionServiceRes_1 = receptionServiceRes_2;
                }
            }
        } else if ((reqDto != null && reqDto.getDeptDeputyCondition() != null && reqDto.getDeptDeputyCondition().equals("PRINCIPAL") || reqDto != null && reqDto.getDeptDeputyCondition() != null && reqDto.getDeptDeputyCondition().equals("PRINCIPAL_DEPUTY"))) {
            //elseif((D1获取部门管理员及正副职(公共).部门管理者获取条件 等于 正职 or D1获取部门管理员及正副职(公共).部门管理者获取条件 等于 正副职))  50102

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_3 = null;
            if (implementAccConditionQueryDeptDeputyComRespDto != null) {
                QueryReceiveFieldDetailReqDto receptionServiceReq_2 = new QueryReceiveFieldDetailReqDto();
                if (implementAccConditionQueryDeptDeputyComRespDto != null && implementAccConditionQueryDeptDeputyComRespDto.getOrgInductionRecordList() != null && !CollectionUtil.isEmpty(implementAccConditionQueryDeptDeputyComRespDto.getOrgInductionRecordList())) {
                    receptionServiceReq_2.setDeptAdminAndDeputyList(implementAccConditionQueryDeptDeputyComRespDto.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, DeptAdminAndDeputyDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1176278_1_50103
                }

                /*M1接收数据集出参[3715]  用于特殊方法接收上游入参。 */

                receptionServiceRes_3 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_2);


                receptionServiceRes_1 = receptionServiceRes_3;
            }
        }
        ObtainDeptAdminAndDeputyComRespDto retData = new ObtainDeptAdminAndDeputyComRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setDeptAdminAndDeputyList(receptionServiceRes_1.getDeptAdminAndDeputyList().stream().map(item -> BeanUtil.toBean(item, DeptAdminAndDeputyDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1175405_1
        }


        return retData;
    }

    /**
     * D1查部门管理员及正副职(公共)[7537]
     * gen by moon at 10/15/2023, 6:10:17 PM
     */
    @Trace(operationName = "D1查部门管理员及正副职(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptAdminAndDeputyListComRespDto queryDeptAdminAndDeputyListCom(QueryDeptAdminAndDeputyListComReqDto reqDto) {


        ObtainDeptAdminAndDeputyComRespDto obtainDeptAdminAndDeputyComRespDto_1 = null;
        List<Users> listUsers_1 = new ArrayList<>();
        List<Userinfo> listUserinfo_1 = new ArrayList<>();
        List<OriginalRoleMemberInfo> listOriginalRoleMemberInfo_1 = new ArrayList<>();
//步骤0: M1-获取接收字段（特殊方法） - queryReceiveFieldDetail
        //ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes = null;
        QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
        if (reqDto != null) {
            receptionServiceReq.setDeptDeputyCondition(reqDto.getDeptDeputyCondition());//SimpleFieldAssign//sourceId:1176321_1
            receptionServiceReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1176322_1
            receptionServiceReq.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:1176323_1
        }

        /*M1-获取接收字段（特殊方法）[3715]  用于特殊方法接收上游入参。 */
        Assert.isNull(receptionServiceReq.getDeptDeputyCondition(), "D1查部门管理员及正副职(公共)-M1-获取接收字段（特殊方法）-部门管理者获取条件不能为空", false);
        Assert.isNull(receptionServiceReq.getDeptId(), "D1查部门管理员及正副职(公共)-M1-获取接收字段（特殊方法）-部门ID不能为空", false);
        Assert.isNull(receptionServiceReq.getPrivacyCode(), "D1查部门管理员及正副职(公共)-M1-获取接收字段（特殊方法）-权限标识不能为空", false);
        receptionServiceRes = nbOrg.queryReceiveFieldDetail(receptionServiceReq);


//步骤1: D1获取部门管理员及正副职(公共) - obtainDeptAdminAndDeputyCom
        ObtainDeptAdminAndDeputyComRespDto obtainDeptAdminAndDeputyComRespDto = null;
        ObtainDeptAdminAndDeputyComReqDto obtainDeptAdminAndDeputyComReqDto = new ObtainDeptAdminAndDeputyComReqDto();
        if (reqDto != null) {
            obtainDeptAdminAndDeputyComReqDto.setDeptDeputyCondition(reqDto.getDeptDeputyCondition());//SimpleFieldAssign//sourceId:1176274_1
            obtainDeptAdminAndDeputyComReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1176271_1
            obtainDeptAdminAndDeputyComReqDto.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:1176272_1
        }

        /*D1获取部门管理员及正副职(公共)[7535]   */
        Assert.isNull(obtainDeptAdminAndDeputyComReqDto.getDeptDeputyCondition(), "D1查部门管理员及正副职(公共)-D1获取部门管理员及正副职(公共)-部门管理者获取条件不能为空", false);
        Assert.isNull(obtainDeptAdminAndDeputyComReqDto.getDeptId(), "D1查部门管理员及正副职(公共)-D1获取部门管理员及正副职(公共)-部门ID不能为空", false);
        Assert.isNull(obtainDeptAdminAndDeputyComReqDto.getPrivacyCode(), "D1查部门管理员及正副职(公共)-D1获取部门管理员及正副职(公共)-权限标识不能为空", false);
        obtainDeptAdminAndDeputyComRespDto = obtainDeptAdminAndDeputyCom(obtainDeptAdminAndDeputyComReqDto)/*vcase invoke 同服务,同domain*/;


        obtainDeptAdminAndDeputyComRespDto_1 = obtainDeptAdminAndDeputyComRespDto;

//步骤2: 1-2-01批量查个人账号 - batchQueryUser
        List<Users> listUsers = new ArrayList<>();
        if (obtainDeptAdminAndDeputyComRespDto != null) {
            BatchQueryUserReq batchQueryUserReq = new BatchQueryUserReq();
            if (obtainDeptAdminAndDeputyComRespDto != null && obtainDeptAdminAndDeputyComRespDto.getDeptAdminAndDeputyList() != null && !CollectionUtil.isEmpty(obtainDeptAdminAndDeputyComRespDto.getDeptAdminAndDeputyList())) {
                batchQueryUserReq.setUsersList(obtainDeptAdminAndDeputyComRespDto.getDeptAdminAndDeputyList().stream().map(item -> item.getUserId())
                        .collect(Collectors.toList()));/*list-to-strings*///sourceId:1176310_1
            }

            /*1-2-01批量查个人手机号[1293]   */

            listUsers = mUsersService.batchQueryUser(batchQueryUserReq)/*vcase invoke 本地 method 方法调用;*/;


            listUsers_1 = listUsers;
        }

//步骤3: 1-2-02批量查询个人资料列表 - batchQueryUserinfoList
        List<Userinfo> listUserinfo = new ArrayList<>();
        BatchQueryUserinfoListReq batchQueryUserinfoListReq = new BatchQueryUserinfoListReq();
//  batchQueryUserinfoListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1176655_1
        if (obtainDeptAdminAndDeputyComRespDto != null && obtainDeptAdminAndDeputyComRespDto.getDeptAdminAndDeputyList() != null && !CollectionUtil.isEmpty(obtainDeptAdminAndDeputyComRespDto.getDeptAdminAndDeputyList())) {
            batchQueryUserinfoListReq.setUserList(obtainDeptAdminAndDeputyComRespDto.getDeptAdminAndDeputyList().stream().map(item -> item.getUserId())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:1176651_1
        }

        /*1-2-02批量查个人资料[52]   */
        listUserinfo = mUserinfoService.batchQueryUserinfoList(batchQueryUserinfoListReq)/*vcase invoke 本地 method 方法调用;*/;


        listUserinfo_1 = listUserinfo;

//步骤4: 1-2-10批量查询身份人员资料列表 - batchQueryBeginMembInfoList
        List<OriginalRoleMemberInfo> listOriginalRoleMemberInfo = new ArrayList<>();
        if (obtainDeptAdminAndDeputyComRespDto != null) {
            BatchQueryBeginMembInfoListReq batchQueryBeginMembInfoListReq = new BatchQueryBeginMembInfoListReq();
            batchQueryBeginMembInfoListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1180107_1
            if (obtainDeptAdminAndDeputyComRespDto != null && obtainDeptAdminAndDeputyComRespDto.getDeptAdminAndDeputyList() != null && !CollectionUtil.isEmpty(obtainDeptAdminAndDeputyComRespDto.getDeptAdminAndDeputyList())) {
                batchQueryBeginMembInfoListReq.setBeginMembInfoList(obtainDeptAdminAndDeputyComRespDto.getDeptAdminAndDeputyList().stream().map(item -> item.getOriginalRoleMemberId())
                        .collect(Collectors.toList()));/*list-to-strings*///sourceId:1180106_1
            }

            /*1-2-10批量查询身份人员资料列表[1014]   */
            Assert.isNull(batchQueryBeginMembInfoListReq.getSpaceId(), "D1查部门管理员及正副职(公共)-1-2-10批量查询身份人员资料列表-创建于空间ID不能为空", false);
            listOriginalRoleMemberInfo = mOriginalRoleMemberInfoService.batchQueryBeginMembInfoList(batchQueryBeginMembInfoListReq)/*vcase invoke 本地 method 方法调用;*/;


            listOriginalRoleMemberInfo_1 = listOriginalRoleMemberInfo;
        }

        QueryDeptAdminAndDeputyListComRespDto retData = new QueryDeptAdminAndDeputyListComRespDto();
        //数据集融合  MoreListToOneSource
        if (obtainDeptAdminAndDeputyComRespDto_1 != null && !CollectionUtil.isEmpty(obtainDeptAdminAndDeputyComRespDto_1.getDeptAdminAndDeputyList())) {
            for (DeptAdminAndDeputyDto deptAdminAndDeputyDto : obtainDeptAdminAndDeputyComRespDto_1.getDeptAdminAndDeputyList()) {
                DeptAdminAndDeputyDto retElm = new DeptAdminAndDeputyDto();
                if (obtainDeptAdminAndDeputyComRespDto_1 != null) {
                    retElm.setUserId(deptAdminAndDeputyDto.getUserId());//SimpleFieldAssign//sourceId:244223_2
                    retElm.setOriginalRoleMemberId(deptAdminAndDeputyDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:244224_2
                }
                retData.getDeptAdminAndDeputyList().add(retElm);
                if (listUserinfo_1 != null && !CollectionUtil.isEmpty(listUserinfo_1)) {
                    for (Userinfo userinfo : listUserinfo_1) {
                        if (userinfo.getUserId().equals(deptAdminAndDeputyDto.getUserId())) {
                            retElm.setUserFace(userinfo.getUserFace());//SimpleFieldAssign//sourceId:244346_2
                            retElm.setIdCardName(userinfo.getIdCardName());//SimpleFieldAssign//sourceId:244347_2
                        }
                    }
                }

                if (listUsers_1 != null && !CollectionUtil.isEmpty(listUsers_1)) {
                    for (Users users : listUsers_1) {
                        if (users.getUserId().equals(deptAdminAndDeputyDto.getUserId())) {
                            retElm.setPhone(users.getPhone());//SimpleFieldAssign//sourceId:244225_2
                        }
                    }
                }

                if (listOriginalRoleMemberInfo_1 != null && !CollectionUtil.isEmpty(listOriginalRoleMemberInfo_1)) {
                    for (OriginalRoleMemberInfo originalRoleMemberInfo : listOriginalRoleMemberInfo_1) {
                        if (originalRoleMemberInfo.getOriginalRoleMemberId().equals(deptAdminAndDeputyDto.getOriginalRoleMemberId())) {
                            retElm.setRoleMemberCode(originalRoleMemberInfo.getRoleMemberCode());//SimpleFieldAssign//sourceId:244779_2
                        }
                    }
                }

            }
        }//sourceId:1176327_1


        return retData;
    }

    /**
     * D1-查询部门列表ByCode(公共)[7668]
     * gen by moon at 11/4/2023, 2:59:42 PM
     */
    @Trace(operationName = "D1-查询部门列表ByCode(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptByCodeListComRespDto queryDeptByCodeListCom(QueryDeptByCodeListComReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//步骤0: 1-3-09批量查询部门列表ByCode - batchQueryDeptByCode
        List<Dept> listDept = new ArrayList<>();
        BatchQueryDeptByCodeReq batchQueryDeptByCodeReq = new BatchQueryDeptByCodeReq();
        if (reqDto != null) {
            batchQueryDeptByCodeReq.setDeptList(reqDto.getDeptList());//list-field-assign//sourceId:1231461_1
            batchQueryDeptByCodeReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:1231462_1
            batchQueryDeptByCodeReq.setLevelNumber(reqDto.getLevelNumber());//SimpleFieldAssign//sourceId:1231465_1
            batchQueryDeptByCodeReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1231463_1
        }

        /*1-3-09批量查询部门列表ByCode[6306]   */

        listDept = mDeptService.batchQueryDeptByCode(batchQueryDeptByCodeReq)/*vcase invoke 本地 method 方法调用;*/;


        listDept_1 = listDept;

        QueryDeptByCodeListComRespDto retData = new QueryDeptByCodeListComRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1231948_1


        return retData;
    }

    /**
     * D1执行设备获取组织个人信息(公共)[8108]
     * gen by moon at 12/12/2023, 5:05:22 AM
     */
    @Trace(operationName = "D1执行设备获取组织个人信息(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementDeviceAcquisitionOrgPersonalInfoComRespDto implementDeviceAcquisitionOrgPersonalInfoCom(ImplementDeviceAcquisitionOrgPersonalInfoComReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_1 = null;
//virtualUsage 1-2-03查询联盟用户详情  56339
        UsersUnion usersUnion = null;
        QueryUsersUnionDetailReq queryUsersUnionDetailReq = new QueryUsersUnionDetailReq();
        if (reqDto != null) {
            queryUsersUnionDetailReq.setUnionAppObjectType(reqDto.getAppId());//SimpleFieldAssign//sourceId:1400938_1_56339
            queryUsersUnionDetailReq.setUserId(reqDto.getApiKey());//SimpleFieldAssign//sourceId:1400937_1_56339
            queryUsersUnionDetailReq.setUnionAppObjectId(reqDto.getApiSecret());//SimpleFieldAssign//sourceId:1400939_1_56339
            queryUsersUnionDetailReq.setOpenId(reqDto.getSn());//SimpleFieldAssign//sourceId:1401541_1_56339
        }

        /*1-2-03查询联盟用户详情[157]   */
        Assert.isNull(queryUsersUnionDetailReq.getUnionAppObjectType(), "D1执行设备获取组织个人信息(公共)-1-2-03查询联盟用户详情-联盟应用对象类型不能为空", false);
        Assert.isNull(queryUsersUnionDetailReq.getUserId(), "D1执行设备获取组织个人信息(公共)-1-2-03查询联盟用户详情-个人账号不能为空", false);
        Assert.isNull(queryUsersUnionDetailReq.getUnionAppObjectId(), "D1执行设备获取组织个人信息(公共)-1-2-03查询联盟用户详情-联盟应用用户ID不能为空", false);
        usersUnion = mUsersUnionService.queryUsersUnionDetail(queryUsersUnionDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        if ((usersUnion != null)) {
            //if(1-2-03查询联盟用户详情.出参 值不等于空 )  56340

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes = null;
            if (usersUnion != null) {
                QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
                if (reqDto != null) {
                    receptionServiceReq.setUserId(reqDto.getApiKey());//SimpleFieldAssign//sourceId:1401750_1_56341
                    receptionServiceReq.setOriginalRoleMemberId(reqDto.getApiSecret());//SimpleFieldAssign//sourceId:1401748_1_56341
                }
                if (usersUnion != null) {
                    receptionServiceReq.setSpaceId(usersUnion.getSpaceId());//SimpleFieldAssign//sourceId:1401756_1_56341
                    receptionServiceReq.setAppId(usersUnion.getAppId());//SimpleFieldAssign//sourceId:1401757_1_56341
                }

                /*M1-接收身份人员ID及个人账号ID[3715]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq.getUserId(), "D1执行设备获取组织个人信息(公共)-M1-接收身份人员ID及个人账号ID-个人账号不能为空", false);
                Assert.isNull(receptionServiceReq.getOriginalRoleMemberId(), "D1执行设备获取组织个人信息(公共)-M1-接收身份人员ID及个人账号ID-身份人员ID不能为空", false);
                Assert.isNull(receptionServiceReq.getSpaceId(), "D1执行设备获取组织个人信息(公共)-M1-接收身份人员ID及个人账号ID-创建于空间ID不能为空", false);
                Assert.isNull(receptionServiceReq.getAppId(), "D1执行设备获取组织个人信息(公共)-M1-接收身份人员ID及个人账号ID-创建于联盟应用ID不能为空", false);
                receptionServiceRes = nbOrg.queryReceiveFieldDetail(receptionServiceReq);


                receptionServiceRes_1 = receptionServiceRes;
            }
        } else {
            //else  56342

//异常结束 56343
            throw new BizException("500", "系统异常，请联系管理员！", false);
        }
        ImplementDeviceAcquisitionOrgPersonalInfoComRespDto retData = new ImplementDeviceAcquisitionOrgPersonalInfoComRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setUserId(receptionServiceRes_1.getUserId());//SimpleFieldAssign//sourceId:1401752_1
            retData.setOriginalRoleMemberId(receptionServiceRes_1.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:1401753_1
            retData.setSpaceId(receptionServiceRes_1.getSpaceId());//SimpleFieldAssign//sourceId:1401760_1
            retData.setAppId(receptionServiceRes_1.getAppId());//SimpleFieldAssign//sourceId:1401761_1
        }


        return retData;
    }

    /**
     * D1-2查询中基层部门详情(公共)[2604]
     * gen by moon at 10/7/2024, 6:13:23 PM
     */
    @Trace(operationName = "D1-2查询中基层部门详情(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryMidBaseCourseDetailComRespDto queryMidBaseCourseDetailCom(QueryMidBaseCourseDetailComReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_1 = null;
        if ((reqDto != null && reqDto.getDeptId() == null && reqDto != null && reqDto.getInductionUnitTypeCode() != null && reqDto.getInductionUnitTypeCode().equals("DEPT"))) {
            //if((D1-2查中基层部门详情(边界).部门ID 值等于空  and D1-2查中基层部门详情(边界).就职单位类型实例 等于 部门))  14411

            InductionRecord inductionRecord = null;
            QueryinductionRecordDetailReq queryinductionRecordDetailReq = new QueryinductionRecordDetailReq();
            queryinductionRecordDetailReq.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:255064_1_14412
            queryinductionRecordDetailReq.setInductionUnitTypeCode("DEPT");//sourceId:255065_1_14412
            queryinductionRecordDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:255066_1_14412

            /*1-3-13查询就职记录详情[165]   */
            Assert.isNull(queryinductionRecordDetailReq.getOriginalRoleMemberId(), "D1-2查询中基层部门详情(公共)-1-3-13查询就职记录详情-身份人员ID不能为空", false);
            Assert.isNull(queryinductionRecordDetailReq.getInductionUnitTypeCode(), "D1-2查询中基层部门详情(公共)-1-3-13查询就职记录详情-就职单位类型实例不能为空", false);
            Assert.isNull(queryinductionRecordDetailReq.getSpaceId(), "D1-2查询中基层部门详情(公共)-1-3-13查询就职记录详情-创建于空间ID不能为空", false);
            inductionRecord = mInductionRecordService.queryinductionRecordDetail(queryinductionRecordDetailReq)/*vcase invoke 本地 method 方法调用;*/;


            if ((inductionRecord == null)) {
                //if(1-3-13查询是否有部门下就职记录.出参 值等于空 )  14413

//processBranchName:正常结束 ,processBranchId:14414

            } else {
                //else  14415

//异常结束 14416
                throw new BizException("500", "系统异常，请联系管理员！", false);
            }
        } else if ((reqDto != null && reqDto.getDeptId() != null && reqDto != null && reqDto.getInductionUnitTypeCode() != null && reqDto.getInductionUnitTypeCode().equals("DEPT"))) {
            //elseif((D1-2查中基层部门详情(边界).部门ID 值不等于空  and D1-2查中基层部门详情(边界).就职单位类型实例 等于 部门))  14417

            Dept dept = null;
            QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
            if (reqDto != null) {
                queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:255261_1_14447
            }

            /*1-3-09查询部门层级[218]   */
            Assert.isNull(queryDeptDetailReq.getDeptId(), "D1-2查询中基层部门详情(公共)-1-3-09查询部门层级-部门ID不能为空", false);
            dept = mDeptService.queryDeptDetail(queryDeptDetailReq)/*vcase invoke 本地 method 方法调用;*/;
            Assert.isTrue(dept == null || dept.getDeptId() == null, "找不到数据，系统异常", false);


            if ((dept != null && dept.getLevelNumber() != null && dept != null && dept.getLevelNumber() == 1L && !(dept != null && dept.getDeptBusinessIdentity() != null && dept.getDeptBusinessIdentity().equals("SCHOOL_LEADER")))) {
                //if((1-3-09查询部门层级.层级 值不等于空  and 1-3-09查询部门层级.层级 等于 1 and 1-3-09查询部门层级.部门业务身份 不等于 校领导))  14419

//ModelCode: receptionService
                QueryReceiveFieldDetailRespDto receptionServiceRes = null;
                if (dept != null) {
                    QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
                    if (dept != null) {
                        receptionServiceReq.setCustomField1(dept.getDeptId());//SimpleFieldAssign//sourceId:1428387_1_57013
                        receptionServiceReq.setCustomField2(dept.getDeptCode());//SimpleFieldAssign//sourceId:1428388_1_57013
                        receptionServiceReq.setCustomField3(dept.getDeptShortName());//SimpleFieldAssign//sourceId:1428389_1_57013
                    }

                    /*M1-接收中基层部门信息[3715]  用于特殊方法接收上游入参。 */

                    receptionServiceRes = nbOrg.queryReceiveFieldDetail(receptionServiceReq);


                    receptionServiceRes_1 = receptionServiceRes;
                }
            } else if ((dept != null && dept.getLevelNumber() != null && dept != null && dept.getLevelNumber() > 1L)) {
                //elseif((1-3-09查询部门层级.层级 值不等于空  and 1-3-09查询部门层级.层级 大于 1))  14421

//ModelCode: findLevelCode
                QueryLookAncestorNodeDetailRespDto findLevelCodeRes = null;
                if (dept != null) {
                    QueryLookAncestorNodeDetailReqDto findLevelCodeReq = new QueryLookAncestorNodeDetailReqDto();
                    findLevelCodeReq.setToLevelNumber(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:80378_1_14422
                    if (dept != null) {
                        findLevelCodeReq.setDeptCode(dept.getDeptCode());//SimpleFieldAssign//sourceId:80375_1_14422
                        findLevelCodeReq.setLevelNumber(dept.getLevelNumber());//SimpleFieldAssign//sourceId:80376_1_14422
                    }

                    /*M-查找祖先(特殊方法）[2202]  通过标识、层级找1级，2级..X级的的CODE */
                    Assert.isNull(findLevelCodeReq.getDeptCode(), "D1-2查询中基层部门详情(公共)-M-查找祖先(特殊方法）-部门标识不能为空", false);
                    Assert.isNull(findLevelCodeReq.getLevelNumber(), "D1-2查询中基层部门详情(公共)-M-查找祖先(特殊方法）-层级不能为空", false);
                    Assert.isNull(findLevelCodeReq.getToLevelNumber(), "D1-2查询中基层部门详情(公共)-M-查找祖先(特殊方法）-目标层级不能为空", false);
                    findLevelCodeRes = nbOrg.queryLookAncestorNodeDetail(findLevelCodeReq);


                }
                Dept dept_2 = null;
                QueryDeptDetailReq queryDeptDetailReq_1 = new QueryDeptDetailReq();
                if (findLevelCodeRes != null) {
                    queryDeptDetailReq_1.setDeptCode(findLevelCodeRes.getDeptCode());//SimpleFieldAssign//sourceId:80475_1_14446
                }

                /*1-3-09查询一级部门ID[218]   */
                Assert.isNull(queryDeptDetailReq_1.getDeptCode(), "D1-2查询中基层部门详情(公共)-1-3-09查询一级部门ID-部门标识不能为空", false);
                dept_2 = mDeptService.queryDeptDetail(queryDeptDetailReq_1)/*vcase invoke 本地 method 方法调用;*/;
                Assert.isTrue(dept_2 == null || dept_2.getDeptId() == null, "找不到数据，系统异常", false);


                if ((!(dept_2 != null && dept_2.getDeptBusinessIdentity() != null && dept_2.getDeptBusinessIdentity().equals("SCHOOL_LEADER")))) {
                    //if(1-3-09查询一级部门ID.部门业务身份 不等于 校领导)  57003

                    Dept dept_4 = null;
                    if (dept != null) {
                        QueryDeptDetailReq queryDeptDetailReq_2 = new QueryDeptDetailReq();
                        queryDeptDetailReq_2.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:256310_1_57004
                        if (dept != null) {
                            queryDeptDetailReq_2.setDeptId(dept.getDeptId());//SimpleFieldAssign//sourceId:256309_1_57004
                        }

                        /*1-3-09查询基层部门（重复查询）[218]   */
                        Assert.isNull(queryDeptDetailReq_2.getDeptId(), "D1-2查询中基层部门详情(公共)-1-3-09查询基层部门（重复查询）-部门ID不能为空", false);
                        Assert.isNull(queryDeptDetailReq_2.getSubjectLifeCycle(), "D1-2查询中基层部门详情(公共)-1-3-09查询基层部门（重复查询）-主体生命周期不能为空", false);
                        dept_4 = mDeptService.queryDeptDetail(queryDeptDetailReq_2)/*vcase invoke 本地 method 方法调用;*/;
                        Assert.isTrue(dept_4 == null || dept_4.getDeptId() == null, "找不到数据，系统异常", false);


                    }
//ModelCode: receptionService
                    QueryReceiveFieldDetailRespDto receptionServiceRes_2 = null;
                    if (dept_4 != null) {
                        QueryReceiveFieldDetailReqDto receptionServiceReq_1 = new QueryReceiveFieldDetailReqDto();
                        if (dept_4 != null) {
                            receptionServiceReq_1.setCustomField4(dept_4.getDeptId());//SimpleFieldAssign//sourceId:1428390_1_57008
                            receptionServiceReq_1.setCustomField5(dept_4.getDeptCode());//SimpleFieldAssign//sourceId:1428391_1_57008
                            receptionServiceReq_1.setCustomField6(dept_4.getDeptShortName());//SimpleFieldAssign//sourceId:1428386_1_57008
                        }

                        /*M1-接收中基层部门信息[3715]  用于特殊方法接收上游入参。 */

                        receptionServiceRes_2 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_1);


                        receptionServiceRes_1 = receptionServiceRes_2;
                    }
                }
            }
        } else if ((reqDto != null && reqDto.getInductionUnitTypeCode() != null && reqDto.getInductionUnitTypeCode().equals("ORG"))) {
            //elseif(D1-2查中基层部门详情(边界).就职单位类型实例 等于 组织)  14622

//processBranchName:正常结束 ,processBranchId:14623

        }
        QueryMidBaseCourseDetailComRespDto retData = new QueryMidBaseCourseDetailComRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setPrimaryDeptId(receptionServiceRes_1.getCustomField1());//SimpleFieldAssign//sourceId:1428398_1
            retData.setPrimaryDeptCode(receptionServiceRes_1.getCustomField2());//SimpleFieldAssign//sourceId:1428399_1
            retData.setPrimaryDeptName(receptionServiceRes_1.getCustomField3());//SimpleFieldAssign//sourceId:1428400_1
            retData.setGrassrootsDeptId(receptionServiceRes_1.getCustomField4());//SimpleFieldAssign//sourceId:1428401_1
            retData.setGrassrootsDeptCode(receptionServiceRes_1.getCustomField5());//SimpleFieldAssign//sourceId:1428402_1
            retData.setGrassrootsDeptName(receptionServiceRes_1.getCustomField6());//SimpleFieldAssign//sourceId:1428403_1
        }


        return retData;
    }

    /**
     * D1获取就职部门的业务身份(公共)[9095]
     * gen by moon at 5/13/2024, 12:45:34 PM
     */
    @Trace(operationName = "D1获取就职部门的业务身份(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ObtainAssumeDeptBusinessIdentityComRespDto obtainAssumeDeptBusinessIdentityCom(ObtainAssumeDeptBusinessIdentityComReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_1 = null;
//virtualUsage D1分析分管领导部门业务角色(公共)  65886
        AnalysisMemberLeaderRoleComRespDto analysisMemberLeaderRoleComRespDto = null;
        AnalysisMemberLeaderRoleComReqDto analysisMemberLeaderRoleComReqDto = new AnalysisMemberLeaderRoleComReqDto();
        if (reqDto != null) {
            analysisMemberLeaderRoleComReqDto.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:1692278_1_65886
            analysisMemberLeaderRoleComReqDto.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1692279_1_65886
        }

        /*D1分析分管领导部门业务角色(公共)[9145]   */
        Assert.isNull(analysisMemberLeaderRoleComReqDto.getOriginalRoleMemberId(), "D1获取就职部门的业务身份(公共)-D1分析分管领导部门业务角色(公共)-身份人员ID不能为空", false);
        Assert.isNull(analysisMemberLeaderRoleComReqDto.getSpaceId(), "D1获取就职部门的业务身份(公共)-D1分析分管领导部门业务角色(公共)-创建于空间ID不能为空", false);
        analysisMemberLeaderRoleComRespDto = roleService.analysisMemberLeaderRoleCom(analysisMemberLeaderRoleComReqDto)/*vcase invoke isSameApp*/;


        if ((analysisMemberLeaderRoleComRespDto != null && analysisMemberLeaderRoleComRespDto.getDeptBusinessIdentity() != null)) {
            //if(D1分析身份人员分管领导角色(公共).部门业务身份 值不等于空 )  65887

            List<InductionRecord> listInductionRecord = new ArrayList<>();
            QueryInductionRecordListReq queryInductionRecordListReq = new QueryInductionRecordListReq();
            queryInductionRecordListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1689862_1_68247
            if (reqDto != null) {
                queryInductionRecordListReq.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:1689861_1_68247
                queryInductionRecordListReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1689863_1_68247
            }

            /*1-3-13查询就职记录列表[166]   */
            Assert.isNull(queryInductionRecordListReq.getOriginalRoleMemberId(), "D1获取就职部门的业务身份(公共)-1-3-13查询就职记录列表-身份人员ID不能为空", false);
            Assert.isNull(queryInductionRecordListReq.getSpaceId(), "D1获取就职部门的业务身份(公共)-1-3-13查询就职记录列表-创建于空间ID不能为空", false);
            Assert.isNull(queryInductionRecordListReq.getSubjectLifeCycle(), "D1获取就职部门的业务身份(公共)-1-3-13查询就职记录列表-主体生命周期不能为空", false);
            listInductionRecord = mInductionRecordService.queryInductionRecordList(queryInductionRecordListReq)/*vcase invoke 本地 method 方法调用;*/;


            List<Dept> listDept = new ArrayList<>();
            if (listInductionRecord != null && !CollectionUtil.isEmpty(listInductionRecord) && listInductionRecord.size() > 0) {
                BatchQueryDeptByEntiyIdReq batchQueryDeptByEntiyIdReq = new BatchQueryDeptByEntiyIdReq();
                batchQueryDeptByEntiyIdReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1689872_1_68248
                if (listInductionRecord != null && !CollectionUtil.isEmpty(listInductionRecord) && listInductionRecord != null && !CollectionUtil.isEmpty(listInductionRecord)) {
                    batchQueryDeptByEntiyIdReq.setDeptList(listInductionRecord.stream().map(item -> item.getEntityId())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:1689871_1_68248
                }
                if (reqDto != null) {
                    batchQueryDeptByEntiyIdReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1689873_1_68248
                }

                /*1-3-09批量查询部门By主键ID[9096]   */
                Assert.isNull(batchQueryDeptByEntiyIdReq.getSpaceId(), "D1获取就职部门的业务身份(公共)-1-3-09批量查询部门By主键ID-创建于空间ID不能为空", false);
                Assert.isNull(batchQueryDeptByEntiyIdReq.getSubjectLifeCycle(), "D1获取就职部门的业务身份(公共)-1-3-09批量查询部门By主键ID-主体生命周期不能为空", false);
                listDept = mDeptService.batchQueryDeptByEntiyId(batchQueryDeptByEntiyIdReq)/*vcase invoke 本地 method 方法调用;*/;


            }
            ImplementDataSetPlusOneComRespDto implementDataSetPlusOneComRespDto = null;
            if (listDept != null && !CollectionUtil.isEmpty(listDept) && listDept.size() > 0 && analysisMemberLeaderRoleComRespDto != null) {
                ImplementDataSetPlusOneComReqDto implementDataSetPlusOneComReqDto = new ImplementDataSetPlusOneComReqDto();
                if (listDept != null && !CollectionUtil.isEmpty(listDept) && listDept != null && !CollectionUtil.isEmpty(listDept)) {
                    implementDataSetPlusOneComReqDto.setDataSetPlusOneList(listDept.stream().map(item -> item.getDeptBusinessIdentity())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:1796127_1_68367
                }
                if (analysisMemberLeaderRoleComRespDto != null) {
                    implementDataSetPlusOneComReqDto.setCommPrimaryKey(analysisMemberLeaderRoleComRespDto.getDeptBusinessIdentity());//SimpleFieldAssign//sourceId:1796128_1_68367
                }

                /*D2执行数据集加一条记录(公共)[5161]   */
                Assert.isNull(implementDataSetPlusOneComReqDto.getCommPrimaryKey(), "D1获取就职部门的业务身份(公共)-D2执行数据集加一条记录(公共)-通用主键ID不能为空", false);
                implementDataSetPlusOneComRespDto = interfaceModeService.implementDataSetPlusOneCom(implementDataSetPlusOneComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            }
            ImplementDataSetDuplicateRemovalComRespDto implementDataSetDuplicateRemovalComRespDto = null;
            if (implementDataSetPlusOneComRespDto != null) {
                ImplementDataSetDuplicateRemovalComReqDto implementDataSetDuplicateRemovalComReqDto = new ImplementDataSetDuplicateRemovalComReqDto();
                if (implementDataSetPlusOneComRespDto != null) {
                    implementDataSetDuplicateRemovalComReqDto.setDataSetDuplicateRemovalList(implementDataSetPlusOneComRespDto.getDataSetPlusOneList());//list-field-assign//sourceId:1796125_1_68366
                }

                /*D2执行数据集记录去重(公共)[5138]   */

                implementDataSetDuplicateRemovalComRespDto = interfaceModeService.implementDataSetDuplicateRemovalCom(implementDataSetDuplicateRemovalComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            }
//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes = null;
            if (implementDataSetDuplicateRemovalComRespDto != null) {
                QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
                if (implementDataSetDuplicateRemovalComRespDto != null) {
                    //simpleList-to-objLists
                    for (String item : implementDataSetDuplicateRemovalComRespDto.getDataSetDuplicateRemovalList()) {
                        DeptDto oneItem = new DeptDto();
                        if (implementDataSetDuplicateRemovalComRespDto != null) {
                            oneItem.setDeptBusinessIdentity(item);//SimpleFieldAssign//sourceId:332830_2_65892
                        }

                        receptionServiceReq.getDeptList().add(oneItem);
                    }//sourceId:1692541_1_65892
                }

                /*M1接收部门业务角色数据集出参[3715]  用于特殊方法接收上游入参。 */

                receptionServiceRes = nbOrg.queryReceiveFieldDetail(receptionServiceReq);


                receptionServiceRes_1 = receptionServiceRes;
            }
        } else if ((analysisMemberLeaderRoleComRespDto != null && analysisMemberLeaderRoleComRespDto.getDeptBusinessIdentity() == null)) {
            //elseif(D1分析身份人员分管领导角色(公共).部门业务身份 值等于空 )  65893

            List<InductionRecord> listInductionRecord_2 = new ArrayList<>();
            QueryInductionRecordListReq queryInductionRecordListReq_1 = new QueryInductionRecordListReq();
            queryInductionRecordListReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1689862_1_65894
            if (reqDto != null) {
                queryInductionRecordListReq_1.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:1689861_1_65894
                queryInductionRecordListReq_1.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1689863_1_65894
            }

            /*1-3-13查询就职记录列表[166]   */
            Assert.isNull(queryInductionRecordListReq_1.getOriginalRoleMemberId(), "D1获取就职部门的业务身份(公共)-1-3-13查询就职记录列表-身份人员ID不能为空", false);
            Assert.isNull(queryInductionRecordListReq_1.getSpaceId(), "D1获取就职部门的业务身份(公共)-1-3-13查询就职记录列表-创建于空间ID不能为空", false);
            Assert.isNull(queryInductionRecordListReq_1.getSubjectLifeCycle(), "D1获取就职部门的业务身份(公共)-1-3-13查询就职记录列表-主体生命周期不能为空", false);
            listInductionRecord_2 = mInductionRecordService.queryInductionRecordList(queryInductionRecordListReq_1)/*vcase invoke 本地 method 方法调用;*/;


            List<Dept> listDept_2 = new ArrayList<>();
            if (listInductionRecord_2 != null && !CollectionUtil.isEmpty(listInductionRecord_2) && listInductionRecord_2.size() > 0) {
                BatchQueryDeptByEntiyIdReq batchQueryDeptByEntiyIdReq_1 = new BatchQueryDeptByEntiyIdReq();
                batchQueryDeptByEntiyIdReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1689872_1_65895
                if (listInductionRecord_2 != null && !CollectionUtil.isEmpty(listInductionRecord_2) && listInductionRecord_2 != null && !CollectionUtil.isEmpty(listInductionRecord_2)) {
                    batchQueryDeptByEntiyIdReq_1.setDeptList(listInductionRecord_2.stream().map(item -> item.getEntityId())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:1689871_1_65895
                }
                if (reqDto != null) {
                    batchQueryDeptByEntiyIdReq_1.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1689873_1_65895
                }

                /*1-3-09批量查询部门By主键ID[9096]   */
                Assert.isNull(batchQueryDeptByEntiyIdReq_1.getSpaceId(), "D1获取就职部门的业务身份(公共)-1-3-09批量查询部门By主键ID-创建于空间ID不能为空", false);
                Assert.isNull(batchQueryDeptByEntiyIdReq_1.getSubjectLifeCycle(), "D1获取就职部门的业务身份(公共)-1-3-09批量查询部门By主键ID-主体生命周期不能为空", false);
                listDept_2 = mDeptService.batchQueryDeptByEntiyId(batchQueryDeptByEntiyIdReq_1)/*vcase invoke 本地 method 方法调用;*/;


            }
//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_2 = null;
            if (listDept_2 != null && !CollectionUtil.isEmpty(listDept_2) && listDept_2.size() > 0) {
                QueryReceiveFieldDetailReqDto receptionServiceReq_1 = new QueryReceiveFieldDetailReqDto();
                if (listDept_2 != null && !CollectionUtil.isEmpty(listDept_2) && listDept_2 != null && !CollectionUtil.isEmpty(listDept_2)) {
                    receptionServiceReq_1.setDeptList(listDept_2.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1692541_1_65896
                }

                /*M1接收部门业务角色数据集出参[3715]  用于特殊方法接收上游入参。 */

                receptionServiceRes_2 = nbOrg.queryReceiveFieldDetail(receptionServiceReq_1);


                receptionServiceRes_1 = receptionServiceRes_2;
            }
        }
        ObtainAssumeDeptBusinessIdentityComRespDto retData = new ObtainAssumeDeptBusinessIdentityComRespDto();
        if (receptionServiceRes_1 != null && receptionServiceRes_1.getDeptList() != null && !CollectionUtil.isEmpty(receptionServiceRes_1.getDeptList())) {
            retData.setDeptList(receptionServiceRes_1.getDeptList().stream().map(item -> item.getDeptBusinessIdentity())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:1689875_1
        }


        return retData;
    }

    /**
     * D1-3批量查询一级部门(公共)[4025]
     * gen by moon at 7/19/2024, 11:30:46 PM
     */
    @Trace(operationName = "D1-3批量查询一级部门(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public BatchQueryOneLevelDeptComRespDto batchQueryOneLevelDeptCom(BatchQueryOneLevelDeptComReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//步骤0: 1-3-09批量查询部门列表 - batchQueryDeptList
        List<Dept> listDept = new ArrayList<>();
        BatchQueryDeptListReq batchQueryDeptListReq = new BatchQueryDeptListReq();
        batchQueryDeptListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:217152_1
        if (reqDto != null) {
            batchQueryDeptListReq.setDeptList(reqDto.getDeptList());//list-field-assign//sourceId:217130_1
            batchQueryDeptListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:217142_1
        }

        /*1-3-09批量查询部门列表[1153]   */
        Assert.isNull(batchQueryDeptListReq.getSpaceId(), "D1-3批量查询一级部门(公共)-1-3-09批量查询部门列表-创建于空间ID不能为空", false);
        listDept = mDeptService.batchQueryDeptList(batchQueryDeptListReq)/*vcase invoke 本地 method 方法调用;*/;


        listDept_1 = listDept;

        BatchQueryOneLevelDeptComRespDto retData = new BatchQueryOneLevelDeptComRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:217161_1


        return retData;
    }

    /**
     * D1模糊查部门列表(公共)[10079]
     * gen by moon at 8/8/2024, 9:36:51 PM
     */
    @Trace(operationName = "D1模糊查部门列表(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryLikeDeptComRespDto queryLikeDeptCom(QueryLikeDeptComReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//步骤0: 1-3-09模糊查询部门列表 - vagueQueryDept
        List<Dept> listDept = new ArrayList<>();
        VagueQueryDeptReq vagueQueryDeptReq = new VagueQueryDeptReq();
        if (reqDto != null) {
            vagueQueryDeptReq.setDeptCode(reqDto.getDeptCode());//SimpleFieldAssign//sourceId:1961389_1
            vagueQueryDeptReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:1961392_1
            vagueQueryDeptReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1961393_1
        }

        /*1-3-09模糊查询部门列表[1570]   */
        Assert.isNull(vagueQueryDeptReq.getDeptCode(), "D1模糊查部门列表(公共)-1-3-09模糊查询部门列表-部门标识不能为空", false);
        listDept = mDeptService.vagueQueryDept(vagueQueryDeptReq)/*vcase invoke 本地 method 方法调用;*/;


        listDept_1 = listDept;

        QueryLikeDeptComRespDto retData = new QueryLikeDeptComRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1961398_1


        return retData;
    }

    /**
     * D1查询本级及下级部门列表(公共)[10080]
     * gen by moon at 8/8/2024, 9:36:54 PM
     */
    @Trace(operationName = "D1查询本级及下级部门列表(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryCurrentAndSubDeptListComRespDto queryCurrentAndSubDeptListCom(QueryCurrentAndSubDeptListComReqDto reqDto) {


        QueryLikeDeptComRespDto queryLikeDeptComRespDto_1 = null;
//步骤0: D1-3查询部门详情(公共)(边界) - queryDeptDetailComBorder
        QueryDeptDetailComBorderRespDto queryDeptDetailComBorderRespDto = null;
        QueryDeptDetailComBorderReqDto queryDeptDetailComBorderReqDto = new QueryDeptDetailComBorderReqDto();
        queryDeptDetailComBorderReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1961421_1
        if (reqDto != null) {
            queryDeptDetailComBorderReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1961407_1
        }

        /*D1-3查询部门标识(用于右模糊查下级部门入参)[2691]   */
        Assert.isNull(queryDeptDetailComBorderReqDto.getDeptId(), "D1查询本级及下级部门列表(公共)-D1-3查询部门标识(用于右模糊查下级部门入参)-部门ID不能为空", false);
        Assert.isNull(queryDeptDetailComBorderReqDto.getSubjectLifeCycle(), "D1查询本级及下级部门列表(公共)-D1-3查询部门标识(用于右模糊查下级部门入参)-主体生命周期不能为空", false);
        queryDeptDetailComBorderRespDto = queryDeptDetailComBorder(queryDeptDetailComBorderReqDto)/*vcase invoke 同服务,同domain*/;


//步骤1: D1模糊查部门列表(公共) - queryLikeDeptCom
        QueryLikeDeptComRespDto queryLikeDeptComRespDto = null;
        if (queryDeptDetailComBorderRespDto != null) {
            QueryLikeDeptComReqDto queryLikeDeptComReqDto = new QueryLikeDeptComReqDto();
            queryLikeDeptComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1961405_1
            if (queryDeptDetailComBorderRespDto != null) {
                queryLikeDeptComReqDto.setDeptCode(queryDeptDetailComBorderRespDto.getDeptCode());//SimpleFieldAssign//sourceId:1961403_1
                queryLikeDeptComReqDto.setOrganizationId(queryDeptDetailComBorderRespDto.getOrganizationId());//SimpleFieldAssign//sourceId:1961404_1
            }

            /*D1模糊查部门列表(公共)[10079]   */
            Assert.isNull(queryLikeDeptComReqDto.getDeptCode(), "D1查询本级及下级部门列表(公共)-D1模糊查部门列表(公共)-部门标识不能为空", false);
            Assert.isNull(queryLikeDeptComReqDto.getOrganizationId(), "D1查询本级及下级部门列表(公共)-D1模糊查部门列表(公共)-组织ID不能为空", false);
            Assert.isNull(queryLikeDeptComReqDto.getSubjectLifeCycle(), "D1查询本级及下级部门列表(公共)-D1模糊查部门列表(公共)-主体生命周期不能为空", false);
            queryLikeDeptComRespDto = queryLikeDeptCom(queryLikeDeptComReqDto)/*vcase invoke 同服务,同domain*/;


            queryLikeDeptComRespDto_1 = queryLikeDeptComRespDto;
        }

        QueryCurrentAndSubDeptListComRespDto retData = new QueryCurrentAndSubDeptListComRespDto();
        if (queryLikeDeptComRespDto_1 != null) {
            retData.setDeptList(queryLikeDeptComRespDto_1.getDeptList().stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1961426_1
        }


        return retData;
    }
    //
}
